Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
Hello,
I am pretty new with Fabric and Data factory.
I have currently proplem that my set variable selects whole row but i only need id column from table.
My SetVariable now:
Solved! Go to Solution.
Hi @Reponen
Thank you very much nilendraFabric for your prompt reply.
For a single row,
@activity('GetDataFromTable').output.value[0].id
Assume the output of GetDataFromTable is as follows:
{
"value": {
"id": 123,
"name": "example",
"age": 30
}
}
Then @activity('GetDataFromTable').output.value.id will return 123.
For multiple rows:
@array(activity('GetDataFromTable').output.value, item().id)
Assume the output of GetDataFromTable is as follows:
{
"value": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}
Then @array(activity('GetDataFromTable').output.value, item().id) will return [1, 2].
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Reponen
Thank you very much nilendraFabric for your prompt reply.
For a single row,
@activity('GetDataFromTable').output.value[0].id
Assume the output of GetDataFromTable is as follows:
{
"value": {
"id": 123,
"name": "example",
"age": 30
}
}
Then @activity('GetDataFromTable').output.value.id will return 123.
For multiple rows:
@array(activity('GetDataFromTable').output.value, item().id)
Assume the output of GetDataFromTable is as follows:
{
"value": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}
Then @array(activity('GetDataFromTable').output.value, item().id) will return [1, 2].
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If i try to use it says that
@array(activity('GetDataFromTable').output.value, item().id)
This code works @activity('GetDataFromTable').output.value[0].id
but gives only first id.
I need a array of ids
Hello @Reponen
Matching: Ensure the column name `id` matches exactly (case-sensitive) with your table schema.
@activity('GetDataFromTable').output.value[0].id
Or
@activity('GetDataFromTable').output.value.id
if this is helpful please accept the answer and give kudos
User | Count |
---|---|
6 | |
4 | |
2 | |
1 | |
1 |
User | Count |
---|---|
13 | |
11 | |
5 | |
5 | |
4 |