How to pass variable to data flow

PeterP1550 80 Reputation points
2023-08-15T23:06:18.0733333+00:00

How do you pass a dynamic variable value to a data flow? It's a file name for the source dataset.

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. Subashri Vasudevan 11,226 Reputation points
    2023-08-16T05:25:13.16+00:00

    Hi PeterP1550

    1. inside data flow, create a parameter called filenameparam (click on white space, you will see parameters tab) Screenshot 2023-08-16 at 10.48.20 AM
    2. Click on debug settings, and under parameters, assign a default value '' for file name param we created in step 1 Screenshot 2023-08-16 at 10.51.26 AM
    3. from pipeline, click on data flow activity, you will see the parameter you created in step 1. click on the expression option and choose pipeline expression. Then choose the variable that holds filename. Screenshot 2023-08-16 at 10.48.38 AM
    4. go to source in data flow and click on options tab. under the wildcard option, select the data flow param created in step1. Screenshot 2023-08-16 at 10.49.00 AM

    Please refer to this documentation page for more details https://learn.microsoft.com/en-us/azure/data-factory/parameters-data-flow

    Also, here is a video that talks about parameterizing file name for source (with only difference being, the file name comes from a foreach item and not variable)

    Hope this helps.

    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.