DP-700 · Question #85
Dynamic Data Copy does NOT use parametrization. You need to configure the ForEach activity to receive the list of tables to be copied. How should you complete the pipeline expression? To answer…
This question tests your ability to configure a ForEach activity in Azure Data Factory (or Synapse Analytics) to iterate over a dynamic list of tables when parametrization is NOT used - meaning the table list is hardcoded or retrieved inline via a pipeline expression.
Question
Explanation
This question tests your ability to configure a ForEach activity in Azure Data Factory (or Synapse Analytics) to iterate over a dynamic list of tables when parametrization is NOT used - meaning the table list is hardcoded or retrieved inline via a pipeline expression.
Approach. When Dynamic Data Copy does not use parametrization, the ForEach activity's 'Items' field must be populated with a JSON array expression that lists the tables directly inline. The correct approach is to use the pipeline expression @json('[{"TABLE_NAME":"Table1"},{"TABLE_NAME":"Table2"}]') or reference a variable/activity output containing the array - for example @variables('tableList') if you pre-populated a variable, or @activity('LookupActivity').output.value if a Lookup activity retrieved the table list from a metadata source. The key is that the Items field of ForEach must resolve to an array at runtime so the activity can iterate once per table. Without parametrization, you embed the list statically in the expression or derive it from a Lookup activity output, rather than passing it in as a pipeline parameter.
Concept tested. Configuring the ForEach activity Items expression in Azure Data Factory pipelines - specifically how to supply a dynamic or static table list using pipeline expressions (JSON arrays, Lookup activity output, or variables) when pipeline parametrization is not in use.
Reference. Microsoft Learn - Azure Data Factory: ForEach Activity (https://learn.microsoft.com/en-us/azure/data-factory/control-flow-for-each-activity)
Topics
Community Discussion
No community discussion yet for this question.