Articles in this section
Category / Section

Create and execute Stored Procedure calls using Syncfusion Data Integration Platform.

2 mins read

Introduction

This ar­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ticle explains how to create and execute the stored procedure calls in the SQL database using the Syncfusion Data Integration.

 

Objective

 

The ExecuteSql and PutSql processors are used in the Syncfusion Data Integration Platform for creating and executing the stored procedure calls.   

 

Example Dataflow to Create Procedure Call

 

Overview

 

List of processors used in this sample

 

Processor

Comments

GenerateFlowFile

Generates the flow files with the procedure query.

PutSql

Creates the stored procedure call in the database.

 

GenerateFlowFile Processor

 

This processor is used to start the running state of the template as­­ per the scheduling time. Here the scheduling time is set to RUN ONCE scheduling.

 

 

It will generate the flow file with the following query given in the custom text property.

 

Create procedure Query

CREATE PROCEDURE UpdateDatabaseTable

AS

BEGIN

Select * from [testSample].[dbo].[Tips];

END

 

 

 

The previous query has been created in the flow file as shown as follows:

 

PutSql Processor

 

This processor is used to create the procedure call in the SQL database with the incoming procedure query in the flow file in which controller service has been configured successfully.

 

 

Stored procedure call has been successfully created in the SQL database as shown as follows:

 

 

How to Execute Created Procedure Call?

 

Overview

 

 

The following table is used in this sample:

Source table name: Tips

 

List of processors used in this sample

 

Processor

Comments

ExecuteSql

Calls the stored procedure query and its resultant data will be transferred in to the flowfile.

ConvertAvroToJson

Converts the AVRO format incoming data into JSON format.

PutFile

Writes the JSON format file in local machine.

 

ExecuteSql Processor

 

This processor runs the query to call created stored procedure query and returns the resultant data in AVRO format.

 

 

 

 

ConvertAvroToJSON Processor

 

This processor converts the AVRO data into JSON format.

 

 

 

PutFile Processor

 

This processor stores the resultant flow file JSON data in to desired local location.

 

 

 

Limitations of calling stored procedure call in ExecuteSql Processor

 

  • Crud operation cannot be performed in the sequential statements of the stored procedure calls.
  • To perform crud operation, you must approach another way using the ExecuteProcess processor.
Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied