Forum Discussion

tan_thiamhuat's avatar
tan_thiamhuat
Post Patron
1 year ago
Solved

how to pass parameters to Dataflow in a Data Pipeline?

I need to pass a range of dates (generated by a Notebook) to a Dataflow which is in a ForEach loop, as seen below:

a) In the Notebook, it creates a array of dates: 

with its StartDate and EndDate specified as Parameters:

 

b) I need to pass those of each date ['2025-08-01','2025-08-02', '2025-08-03'] to the Dataflow in the ForEach loop. In the ForEach, Settings->Items, I have below:

c) In the Dataflow, I have the InputDate which is hardcoded:

How do I pass the InputDate as a Parameter to the Dataflow?

Thanks.

 

  • Hi tan_thiamhuat,

    please follow below steps to pass dates dynamically:

     

    • Make your notebook return a JSON array of dates like: ["2025-08-01","2025-08-02","2025-08-03"]
    • In the ForEach Items box, read that output: @json(activity('Notebook_GenerateDates').output.result.exitValue)
    • Pass into Dataflow – Inside the ForEach, open the Dataflow activity → Parameters tab.
      1. Create a parameter in your Dataflow called InputDate.
      2. Map it to the loop’s current value: @item()
    • Use in Dataflow – In Power Query, replace your hard-coded line: InputDate = "2025-08-01" with the parameter: InputDate = Text.From(InputDate)

     

     

    Thanks,

    Prashanth Are

    MS Fabric community support

2 Replies

  • v-prasare's avatar
    v-prasare
    Community Support

    Hi tan_thiamhuat,

    please follow below steps to pass dates dynamically:

     

    • Make your notebook return a JSON array of dates like: ["2025-08-01","2025-08-02","2025-08-03"]
    • In the ForEach Items box, read that output: @json(activity('Notebook_GenerateDates').output.result.exitValue)
    • Pass into Dataflow – Inside the ForEach, open the Dataflow activity → Parameters tab.
      1. Create a parameter in your Dataflow called InputDate.
      2. Map it to the loop’s current value: @item()
    • Use in Dataflow – In Power Query, replace your hard-coded line: InputDate = "2025-08-01" with the parameter: InputDate = Text.From(InputDate)

     

     

    Thanks,

    Prashanth Are

    MS Fabric community support

  • v-prasare's avatar
    v-prasare
    Community Support

    Hi tan_thiamhuat,

    We would like to confirm if you've successfully resolved this issue or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.

     


    Thanks,

    Prashanth

    MS fabric community support