Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hello,
I have a JSON file with this structure from a CopyData activity step in my Data Factory pipeline:
"value": [{
"id": "123",
"isReadOnly": false,
//additional key-values
}, {
"id": "1234",
"isReadOnly": false,
//additional key-values
}, {
"id": "12345",
"isReadOnly": false,
//additional key-values
},
I want to extract all the 'ids' and turn them into an array so that I can iterate over them in a ForEach activity in Data Factory ex. ["123","1234","12345"]. How do I accomplish this?
I am very new to Data Factory so thank you for any other suggestions regarding using the ForEach to iterate over all the ids. As well, if you are able, the more detail the better. Thank you!
Solved! Go to Solution.
Hey,
The output Value is by default an Array.
You can iterate over the Copy activity output directly via For each and get the ID details per iteration itself.
where parameter Test value is :
[{ "id": "123", "isReadOnly": false }, { "id": "1234", "isReadOnly": false }]
You can use For each activity to iterate over the value directly
within for each, use Set variable activity to get the ID value
Output :
Hey,
The Parameter is just an example for demonstration purpose.
If the file size is less, you can use lookup activity to read the file and use that lokup value inplace of parameter
Hey,
The output Value is by default an Array.
You can iterate over the Copy activity output directly via For each and get the ID details per iteration itself.
where parameter Test value is :
[{ "id": "123", "isReadOnly": false }, { "id": "1234", "isReadOnly": false }]
You can use For each activity to iterate over the value directly
within for each, use Set variable activity to get the ID value
Output :
Thank you for answering my question, but how do I make the Default Value in the Parameters my Id key from my JSON file? In your example, it looks like the JSON file has been copy pasted into default value but since I'm creating a new JSON file everytime I run copy data, how would I make sure that that new JSON file is always used?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 |