Passing a variable from a pipeline into a Data Flow

Debbie Edwards 521 Reputation points
2022-07-27T13:27:50.643+00:00

I have a Pipeline with the following activity ![225267-setvariable.jpg][1] @substring(convertFromUtc(utcNow(),'GMT Standard Time'),0,19) If my next activity was Copy I would use this to set the End Time UTC of Filter Last Modified. I have a Parameter I use for Start Time UTC and this allows me to copy the correct file from the list of dated files I have in my data lake. However my next activity will be a data flow because the source is a complex JSON and I had to go the data flow route And I cant use the variable I have created in the pipeline in the dataflow I thought about just adding @substring(convertFromUtc(utcNow(),'GMT Standard Time'),0,19) straight into the Filter Last Modified within the data flow but it seems that code code is different so I cant just use this. I wonder if anyone has an idea how I can get this set up so I can have the current date set in the right format to be able to grab the right file in my data lake folder? This is my copy activity set up when I do this for Copy csv to SQL ![225268-from-to.jpg][2] [1]: /api/attachments/225267-setvariable.jpg?platform=QnA [2]: /api/attachments/225268-from-to.jpg?platform=QnA

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

Accepted answer
  1. MartinJaffer-MSFT 26,106 Reputation points
    2022-07-27T19:06:01.79+00:00

    Hello anonymous user,
    Thanks for the question and using MS Q&A platform.

    As we understand the ask here is "How to pass variable from pipeline to data flow".

    Before we can pass the variable / parameter from the pipeline, we need to make sure the Data flow is expecting to receive one. We need to create a parameter in the data flow.

    1. Go to your data flow
    2. click in the blank space to move focus away from the transformations. It is just like clicking in the blank pipeline area to get to the pipeline parameters
    3. you should now see in bottom pane "Parameters" and "Settings". You want "Parameters"
    4. Click + New
    5. Adjust the Name and Type as appropriate
    6. The default value is similar to the default value in pipeline variables in that it will be overwritten. Don't worry about this yet, the complicated part is still to come later. For simplicity, lets leave it blank.

    225433-image.png

    Now that we have created a data flow parameter, it is time to pass values to it.

    1. Go back to the pipeline
    2. Select the Data flow activity
    3. Select the Parameters tab
    4. you should now see the data flow parameter "slot" you created
    5. Click in the "Value" field. This will let you choose whether a pipeline expression or data flow expression. This is the hard part. Choose pipeline expression
    6. The pipeline expression builder opens up. Here is where you can pass in the variables.

    225425-image.png

    Please do let me if you have any queries.

    Thanks
    Martin


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
      • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    6 people found this answer helpful.

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.