Search code examples
azure-data-factorypowerquery

ADF Power Query with Dynamic Parameter


I have azure blob storage with csv file, new file will be coming 5 times a day the location of the files will be under a specific folder with a new file name for each transmission.

I performed data wrangling on the file before sinking the data in a SQL Azure Table. Does anyone know how to pass a Dynamic Parameter in Power Query based on the newly created file name in blob storage then have that name be passed to Power Query?

I started working on something like this but I'm stuck

enter image description here

enter image description here

Unfortunately, I don't know where to go from here, this is the only documentation I found online.

I appreciate your help with this issue.

Thanks


Solution

    • Create a pipeline parameter named TriggerFileName.

    • Create a dataset parameter for FileName

    • Give the value for that parameter as @pipeline().parameters.TriggerFilename in the powerquery settings.

    • When you add the trigger to the pipeline, give the value for the parameter TriggerFilename as @triggerBody().fileName

    • Make sure to "Publish", so that trigger will be activated.

    Once you have defined the parameters and set their values as described in the above instructions, you should be able to use the parameter values in your Power Query script to read the file name dynamically from Azure Blob Storage.