Forum Discussion

cw88's avatar
cw88
Helper IV
3 years ago
Solved

Set parameter for scheduled run

Hi, 

is it possible to set pipeline parameter on a schedule? I want to schedule the same pipeline three times a day, every time with a different parameter. The parameter is used in a lookup activity to get the metadata for a for each loop.

Thanks!

  • No you cant set parameter on a schedule.

    But you can create 3 pipeline parameters, and use the right one conditionally based on an "if" activity.

4 Replies

  • ajarora's avatar
    ajarora
    Microsoft Employee

    No you cant set parameter on a schedule.

    But you can create 3 pipeline parameters, and use the right one conditionally based on an "if" activity.

    • cw88's avatar
      cw88
      Helper IV

      Thanks for your answer!

      Is there a plan to implement this feature in the future? it already limits the usage if the parameters cannot be set from outside (comparable to ssis packages)

  • Hi, I have a solution for your requirement:

     

    1. Create a dictionary table in your Lakehouse or SQL DB and map each schedule run with the relevant parameter values.

    2. In your pipeline, use a Lookup activity to query this table.

    3. After the Lookup activity, add a Filter activity to filter the results by the current run time (you can catch it with @pipeline().TriggerTime) and get the relevant parameter values.

    4. Define Set Variable activities in the pipeline and assign these values to variables (ideally use the same names as your parameters for clarity).

    5. Use these variables instead of parameters everywhere in your pipeline.


    If you also want a separate behavior when the pipeline is run manually instead of by schedule:

    • Add an If Condition activity before the above steps to check if the pipeline is running manually (use @pipeline().TriggerType).

    • If it’s manual, skip the dictionary lookup and directly set your variables with manual values.

    • Then use these variables in your pipeline logic.


    This way you don’t need to duplicate pipelines or schedules—you centralize the parameter mapping in one place and control behavior dynamically.