Pass value from an array selectively to For Each

Kumar, Arun 336 Reputation points
2024-05-03T19:53:04.3366667+00:00

Hi,

I have a parent pipeline that captures values in an array - ArrayFullLoadData. Currently ArrayFullLoadData have three values [A,B,C] and the same is passed to a ForEach with @pipeline.parameters.ArrayFullLoadData. Inside ForEach, values A, B,C are passed to notebooks and dataflow in a loop.

I need to split the single ForEach run into three ForEach in series, so ForEach1 will take on value A, ForEach2 will take Value B and ForEach3 will take value C. Any suggestions how to do this?

Looking for something like @equals(pipeline.parameters.ArrayFullLoadData, 'A'), but this is not working. Do we have something similar to a where clause like in SQL and pass array value to ForEach?

Thanks,
Arun

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2024-05-15T11:35:57.57+00:00

    @Kumar, Arun - I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: Pass value from an array selectively to For Each

    Solution: The issue is resolved. Ok i fixed the issue. Created three ForEach loops and connected in series. Inside ForEach loop used If Condition to check for array values A, B, C. So first ForEach will run only for A, second for B and third for C

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    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.