For Each Loop in Data Factory @item() not working

Oliver 20 Reputation points
2023-02-24T10:06:34.1333333+00:00

I am trying to loop over an array of IDs and executing an ADX/ KQL query for each ID.

Screenshot 2023-02-24 105641

I have defined the IDs in an array (partly censored).
And I want to then execute an ADX query for each element in the array as defined as follows:

User's image

within the loop I have an ADX query block that gives me the following feedback

User's image

And if I execute the statement the query looks as follows in the JSON:

User's image

And as you can see the @item dynamic content/ variable is not transformed and can therefore not be executed properly. I am just missing something small but I cannot find out what.

Thank you.

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
576 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2023-02-27T09:01:59.61+00:00

    Hi Oliver,

    Thank you for posting query in Microsoft Q&A Platform.

    Here you are writing expression inside string, so you need to use string interpolation syntax to write expressions. Click here to know more about it.

    Kindly consider writing your query as below. Please note, for expressions here I am using @{}.

    ProductRam
    | where deviceid == 
    | take 10
    

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.

    1 person found this answer helpful.

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.