In this blog, we are going to Trigger ADF Pipeline whenever there is insert or update operation is performed on on-premise SQL Server.
- Create ADF Pipeline.
In this case we have already created Pipeline.
And below is Dataflow.
- Create PowerShell Script (for Authentication and Triggering Pipeline).
Below is the code for authentication and triggering of Pipeline, to do so we should have following details: Tenant ID, Application ID ,Client Secret, Subscription ID, Resource group Name, API version and pipeline name.
- Create Job in SQL and Trigger on Table where Insert update or delete.
- Make sure that SQL server agent is running.
- Create a SQL Job with following Job Step
Enter step name, select type as PowerShell, select account will be used to run PowerShell script and enter the code in command section.
- Next we will create trigger on the tables
We are creating triggers on the tables on which insert, update, delete operations will be performed.
- Now whenever we will do insert, update or delete in the table the pipeline will automatically get executed.
We have following data in Accounts table,
Now we updated currency of Account ID 1,
the moment we updated the record pipeline gets automatically triggered,
After some time check status,
Hope above helps!