Retrieving personal information using a stored procedure - 7.3

MSSql

Version
7.3
Language
English
Product
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 Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Database components (Integration) > MSSql components
Data Quality and Preparation > Third-party systems > Database components (Integration) > MSSql components
Design and Development > Third-party systems > Database components (Integration) > MSSql components
Last publication date
2024-02-21

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