Reputation: 43
How do I create stored procedures using Azure Data Factory pipeline?
What activity should I use?
I have an existing pipeline where a stored procedure will be called and and export its data returned to Azure Storage. But the stored procedure I used is manually created.
Now I wanted to include in the pipeline where it will create the stored procedure first rather than creating it manually.
Upvotes: 0
Views: 2163
Reputation: 5074
You can use a copy data
activity sink to create a Stored Procedure.
In pre-copy script under the sink settings, write your script to create a procedure.
Note: You don’t have an option to write pre-copy script in the source
Below is how I have done this:
sample code: CREATE PROCEDURE p1 AS select 'Hello' as col1
Copy data activity2:
Source:
Sink:
Output:
Upvotes: 1
Reputation: 5
If I'm understanding correctly, you're trying to create a stored procedure before you call it in a pipeline Copy Job?
You can use a Pre-copy script to create the Stored Procedure, and if the copy job is targeting that stored procedure, just use the 'Edit' feature and manually enter the name of the procedure.
Upvotes: 0