Create job_execution_id and get pipeline_run id in the dataflow

Aditya Singh 160 Reputation points
2024-03-12T05:52:34.2333333+00:00

I am creating a file in the dataflow and want to create a column for job_execution id so that every times the job run I get a unique id for the file and also want to get the pipeline_run_id on every execution.

Sample job

job_execution_id and pipeline_idUser's image

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
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.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. Richard Swinbank 527 Reputation points
    2024-03-13T12:44:06.8666667+00:00

    Are you running the dataflow multiple times from a single pipeline run? If so, there are a few ways to generate your own unique ID:

    • you can use the Lookup activity to create a log record in a database table with an IDENTITY column, then return the generated identity to ADF. The generated identity can be passed to the dataflow as a parameter.
    • you can use the guid() pipeline expression function to generate a GUID in the pipeline iteself, then pass the generated value to the dataflow

    If you are only running the dataflow once per pipeline run, I would suggest simply using the pipeline run ID as it will correspond one-to-one with the dataflow execution.

    0 comments No comments

Your answer

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