Does "Publish" replace everything in live mode in Azure Data Factory

Narender Kumar 70 Reputation points
2023-08-14T09:53:07.9766667+00:00

I need to create some triggers in Azure Data Factory via API.

I know that it creates the trigger in live mode and not in the main git branch.

I want to know if I have published my code today from main branch.

Then I create some triggers using API that will create in live mode.

Tomorrow, If I change anything in the pipeline via UI in main branch and Publish again, Will I loose my triggers which were created using API?

Does Publish replace everything in the live mode or It will not delete the triggers?

What is the best way to create my triggers via API in live mode as well as main branch?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,444 questions
{count} votes

Accepted answer
  1. Bhargava-MSFT 31,246 Reputation points Microsoft Employee
    2023-08-17T18:27:49.4333333+00:00

    Hello Narender Kumar,

    I'm glad that you were able to find a workaround for the ask, and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    When ADF is connected to GIT, how to create a trigger in the main branch using the APIs(how to prevent replacing everything in the live mode)

    Solution:

    1. Create the trigger using API in live mode.
    2. Get the trigger details as JSON using the get trigger API.
    3. Place the JSON as a trigger file in the main branch.

    This way trigger will be created in both live mode and the main branch.

    Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.