Is there a way to create a pipeline that stops all triggers at once?

NishimuraChinatsu-9854 756 Reputation points
2022-07-19T01:06:18.85+00:00

Is there a way to create a pipeline that stops all triggers at once?

I need to stop all triggers at the time of release to release, so if there is a good way to do this, please let me know.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,467 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 31,721 Reputation points Microsoft Employee
    2022-08-05T05:59:28.823+00:00

    Hi @NishimuraChinatsu-9854 ,

    I tried to perform cancelling trigger using REST API in synapse from my side and it's working fine for me. Kindly check what's missing at your end:

    1. Please make sure the synapse managed identity is having Contributor access to the Synapse workspace.
    2. Use Web activity and send a GET request to the REST API using the URL: {endpoint}/triggers?api-version=2020-12-01

    228326-image.png

    3. Use ForEach activity to iterate through the output of web activity:

    228340-image.png

    4. Use Web activity inside ForEach to send a POST request using the REST API URL {endpoint}/triggers/@{item().name}/stop?api-version=2020-12-01 . Providing headers is not required.

    228413-image.png

    5. Publish your pipeline and trigger the same.
    6. After the pipeline execution has been completed, refresh the Synapse workspace and check if the triggers has been stopped or not .

    228384-image.png

    ---------------

    Hope it helps. Please consider accepting the answer by clicking Accept answer button.


1 additional answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 31,721 Reputation points Microsoft Employee
    2022-07-19T06:37:03.867+00:00

    Hi @NishimuraChinatsu-9854 ,
    Thankyou for using Microsoft Q&A platform and thanks for posting your question here.
    As I understand your query, you want to know if there is any workaround to create a pipeline which would stop all the triggers in ADF . Please let me know if my understanding is incorrect.

    Use Triggers - Get REST API in WebActivity to get the list of all triggers present in your ADF workspace and then loop through each one of them using ForEach activity and use Triggers - Stop REST API to stop the triggers.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators