Synapse Stop and Restart Triggers missing in Github Actions

Rhuan Samary Barreto 90 Reputation points

In the following link:

There is a way for stopping and restarting triggers in Azure DevOps Release pipeline. But this is missing for Github Actions. The only thing we have available is to deploy/validate templates.

How can I stop and restart triggers so they can be automatically deployed using Github Actions?

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,557 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 28,111 Reputation points Microsoft Employee

    Hello Rhuan Samary Barreto,

    Welcome to the MS Q&A platform.

    To stop a trigger, you can include the below code in the workspace template.

    az synapse trigger stop --name "myTrigger" --workspace-name "myWorkspace"

    To start a trigger:

    az synapse trigger start --name "myTrigger" --workspace-name "myWorkspace"

    To stop all triggers in a Synapse workspace using the az synapse trigger stop command, you can use the az synapse trigger list command to get a list of all triggers in the workspace, and then loop through the list to stop each trigger.

    # Set the workspace name and resource group name
    # Get the list of triggers in the workspace
    triggerList=$(az synapse trigger list --workspace-name $workspaceName --resource-group $resourceGroupName --query "[].name" -o tsv)
    # Loop through the list of triggers and stop each one
    for triggerName in $triggerList
      echo "Stopping trigger $triggerName"
      az synapse trigger stop --name $triggerName --workspace-name $workspaceName --resource-group $resourceGroupName

    To start all triggers in the end:

    # Loop through the list of triggers and start each one
    for triggerName in $triggerList
      echo "Starting trigger $triggerName"
      az synapse trigger start --name $triggerName --workspace-name $workspaceName --resource-group $resourceGroupName

    I hope this helps. Please let me know if you have any further questions.

    0 comments No comments