Search code examples
azureazure-sql-databaseazure-data-factoryazure-synapse

Call stored procedure from ADF and sink to Azure SQL database


I'm struggling with calling the stored procedure (create in SSMS, Azure serverless pools) in ADF and sink to AZURE database.

I have a copy data activity, my Source dataset is linked to my synapse analytics serverless pools:

enter image description here

My Sink is connected to an Azure SQL database parameter in the Sink coming from the Azure SQL database Dataset.

enter image description here

This is where I want to write output from the stored procedure. Problem is that I could not figure out how I could TRUNCATE TABLE in Pre-copy-Script.


Solution

  • There is a text box for pre-copy script on your 2nd screen dump.

    Just add TRUNCATE TABLE YOURTABLENAME in the box. Replacing YOURTABLENAME with the actual name of your table.