'Passing parameters to an invoked pipeline in Azure Data Factory

I am trying to extract a month and year value from an array, then pass them as variables to an invoked pipeline.

Pipeline image

I am using the following code to extract the year and month parameters in the dynamic content pane (date is in yyyy-mm-dd format).

Year: @variables('DateRange')[substring(item(),0,4)]

Month: @variables('DateRange')[substring(item(),6,2)]

But it is not working because it is trying to substring the index number rather than the array content. What syntax would I use to substring the values in the array, via for loop?



Solution 1:[1]

  • Pass the array variable to ForEach activity.
  • Add the execute pipeline activity inside the ForEach activity.
  • Then you can use your expression to substring the current item and pass as parameter values.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NiharikaMoola-MT