Retrieving personal information using a stored procedure - 6.5

MSSql

EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
EnrichPlatform
Talend Studio
task
Data Governance > Third-party systems > Database components > MSSql components
Data Quality and Preparation > Third-party systems > Database components > MSSql components
Design and Development > Third-party systems > Database components > MSSql components

This scenario describes a Job that retrieves a personal information record from a specified table using a stored procedure according to the id value defined in the input flow.

For more technologies supported by Talend, see Talend components.

In this scenario, the table to retrieve data from contains the personal information. To reproduce this scenario, you can write the data into the table from a CSV file like the following. For how to write data into a MS SQL table, see Inserting data into a database table and extracting useful information from it.

id;name;sex;age
1;Ford;Male;25
2;Rose;Female;30
3;Sabrina;Female;28
4;Teddy;Male;32
5;Kate;Male;35

In this scenario, the stored procedure used to retrieve the personal information is as follows:

CREATE PROCEDURE [dbo].[QueryPerson]
@id int,
@name varchar(50)
AS
BEGIN
SET NOCOUNT ON
SELECT * FROM dbo.person where id=@id
END