Triggering Azure Pipeline from on premise SQL Server | CloudFronts

Triggering Azure Pipeline from on premise SQL Server

In this blog, we are going to Trigger ADF Pipeline whenever there is insert or update operation is performed on on-premise SQL Server.

Steps:

  • 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!


Share Story :

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close