ADF - Function to generate a new GUID

Kothai Ramanathan 946 Reputation points Microsoft Employee
2020-08-18T04:15:26.007+00:00

I have a requirement to get a new GUID for every run of the pipeline. Is there any inbuilt ADF function which can generate a new guid for me ?

Thanks,
Kothai

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

Accepted answer
  1. Vaibhav Chaudhari 38,806 Reputation points
    2020-08-18T05:33:52.3+00:00

    I see guid() function that generates unique GUID documented in in below. Please try it -

    ADF - control-flow-expression-language-functions

    I also responded to your previous post here - adf-support-for-generating-a-new-guid.html

    =========================================================

    Please don't forget to "Accept Answer" and upvote if the response helped -- Vaibhav

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Schofield, Ray (Automation) 11 Reputation points
    2021-02-01T12:55:20.487+00:00

    Have you seen the UUID function, available in a dataflow?

    2 people found this answer helpful.
    0 comments No comments

  2. james 0 Reputation points
    2023-06-16T06:53:24.72+00:00

    In Azure Data Factory (ADF), there is no built-in function specifically designed to generate a new GUID for every run of the pipeline. However, you can achieve this requirement by using an expression within ADF.

    Here's an example of how you can generate a new free GUID using an expression in ADF:

    1. Open your ADF pipeline in the Azure portal.
    2. Select the activity where you want to generate the GUID, such as a copy activity.
    3. In the properties pane on the right, find the field where you want to assign the new GUID.
    4. Click on the field to open the expression builder.
    5. Use the expression @guid() to generate a new GUID.

    For example, if you want to generate a new GUID for a pipeline parameter named "runId", you can set the default value using the expression guid

    0 comments No comments

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.