Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)

Background: I have scheduled pipelines running for copying data from source to destination. This is scheduled to run daily at a specific time.

Problem: The input dataset to the pipeline is external and not available at specific time intervals. This means the copy activity will have to wait until the Scheduled Start time mentioned in the Pipeline to kickoff. Considering the volume of data, I don't want to waste my time here.

Requirement: At any given time I have access to the time when my input data set is available. With this in hand, I want to know how to trigger an ADF Pipeline from C# though its scheduled to start only at a specific time.

1 Answer

0 votes
by (16.8k points)

It applies to V2, and I took reference from this article 

Check the commands below:

{

    "properties": {

        "name": "MyTrigger",

        "type": "ScheduleTrigger",

        "typeProperties": {

            "recurrence": {

                "frequency": "Hour",

                "interval": 1,

                "startTime": "2017-11-01T09:00:00-08:00",

                "endTime": "2017-11-02T22:00:00-08:00"

            }

        },

        "pipelines": [{

                "pipelineReference": {

                    "type": "PipelineReference",

                    "referenceName": "SQLServerToBlobPipeline"

                },

                "parameters": {}

            },

            {

                "pipelineReference": {

                    "type": "PipelineReference",

                    "referenceName": "SQLServerToAzureSQLPipeline"

                },

                "parameters": {}

            }

        ]

    }

}

After this, save your code file into .JSON file in your directory by using the command below:

Set-AzureRmDataFactoryV2Trigger -ResourceGroupName  resourceGroupName -DataFactoryName dataFactoryName -Name "ScheduleTriggerName" -DefinitionFile ".\ScheduleTriggerName.json"

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...