question

84921301 avatar image
0 Votes"
84921301 asked ShaikMaheer-MSFT commented

ADF Trigger Usecase

We have requirement where pipeline A runs every day and pipeline B runs once in every month and it is dependent on pipeline A (pipeline B should trigger after successful completion of pipeline A).

Using scheduled trigger, we cannot have hard dependencies between 2 pipelines, where as with tumbling window, we cannot exactly specify the day which the pipeline B should run(it has only two options, minutes and hours where as scheduled trigger has months and weeks also)

Both the triggers has its disadvantages with respect to this scenario.

What could be the best possible solution for the above scenario?

azure-data-factory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SarvagnaPamidi-7119 ,

Could you please mark below answer as Accepted Answer? Accepted answer helps us and community also. Thank you.

0 Votes 0 ·

1 Answer

ThomasBoersma avatar image
0 Votes"
ThomasBoersma answered ShaikMaheer-MSFT commented

Hi @SarvagnaPamidi-7119

The first solution that comes to mind is to add an 'If Condition' to your pipeline A or create a new pipeline and add Pipeline A and the condition activity to it (as shown in the example). The adjusted or new pipeline should have a trigger on it that is set to every day. The 'If Condition' activity checks if the current date is the first of the month. If so, it should activate your pipeline B.

Here is an example:
128199-image.png

The code in the If Condition activity could be: @equals(dayOfMonth(utcnow()), 1)

Maybe there are better suited solutions, but I think it is not possible to succeed with only triggers. There should be a condition somewhere.

Hope this helps.




image.png (11.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @ThomasBoersma , it is good solution.

0 Votes 0 ·

Hi @SarvagnaPamidi-7119 ,

Thank you for accepting answer.

0 Votes 0 ·