Azure Logic App - Foreach over sql resultset
up vote
0
down vote
favorite
I'm using an Execute Sql Query action in logic app.
Returned result is composed of 1..n tables ("selects").
I want to create a csv table and send it over tfs.
The issue I'm having is that the tables are elements of resultset, and not part of an array.
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?
azure azure-logic-apps
add a comment |
up vote
0
down vote
favorite
I'm using an Execute Sql Query action in logic app.
Returned result is composed of 1..n tables ("selects").
I want to create a csv table and send it over tfs.
The issue I'm having is that the tables are elements of resultset, and not part of an array.
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?
azure azure-logic-apps
1
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using an Execute Sql Query action in logic app.
Returned result is composed of 1..n tables ("selects").
I want to create a csv table and send it over tfs.
The issue I'm having is that the tables are elements of resultset, and not part of an array.
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?
azure azure-logic-apps
I'm using an Execute Sql Query action in logic app.
Returned result is composed of 1..n tables ("selects").
I want to create a csv table and send it over tfs.
The issue I'm having is that the tables are elements of resultset, and not part of an array.
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?
azure azure-logic-apps
azure azure-logic-apps
asked Nov 11 at 9:48
Dani T
183
183
1
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07
add a comment |
1
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07
1
1
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?'
According to the mentioned data format, it seems that it is not supported via foreach action in logic app.
If Azure function is acceptable, I recommend that you could use the Azure function to implement it with your customized logic to deal with data.
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
add a comment |
up vote
0
down vote
Foreach on a Resultset will return JSON object of each row.
I couldn't find any option DesignView to extract the value but you can achieve same in CodeView by assigning following code to your variable in CodeView.
In below MEETINGID is my column name.
"@items('For_each')?['MEETINGID']"
"imeetingid": "@items('For_each')?['MEETINGID']"
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?'
According to the mentioned data format, it seems that it is not supported via foreach action in logic app.
If Azure function is acceptable, I recommend that you could use the Azure function to implement it with your customized logic to deal with data.
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
add a comment |
up vote
1
down vote
accepted
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?'
According to the mentioned data format, it seems that it is not supported via foreach action in logic app.
If Azure function is acceptable, I recommend that you could use the Azure function to implement it with your customized logic to deal with data.
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?'
According to the mentioned data format, it seems that it is not supported via foreach action in logic app.
If Azure function is acceptable, I recommend that you could use the Azure function to implement it with your customized logic to deal with data.
Is there some way to perform ForEach action on the resultset elements (i.e. - 'Table1', 'Table2', etc...)?'
According to the mentioned data format, it seems that it is not supported via foreach action in logic app.
If Azure function is acceptable, I recommend that you could use the Azure function to implement it with your customized logic to deal with data.
answered Nov 20 at 9:45
Tom Sun
15.9k2921
15.9k2921
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
add a comment |
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
No way that I have seen to do a foreach loop on these elements... Seems like going to an Azure Function will be the answer in this case... Thanks!
– Dani T
Nov 22 at 5:32
add a comment |
up vote
0
down vote
Foreach on a Resultset will return JSON object of each row.
I couldn't find any option DesignView to extract the value but you can achieve same in CodeView by assigning following code to your variable in CodeView.
In below MEETINGID is my column name.
"@items('For_each')?['MEETINGID']"
"imeetingid": "@items('For_each')?['MEETINGID']"
add a comment |
up vote
0
down vote
Foreach on a Resultset will return JSON object of each row.
I couldn't find any option DesignView to extract the value but you can achieve same in CodeView by assigning following code to your variable in CodeView.
In below MEETINGID is my column name.
"@items('For_each')?['MEETINGID']"
"imeetingid": "@items('For_each')?['MEETINGID']"
add a comment |
up vote
0
down vote
up vote
0
down vote
Foreach on a Resultset will return JSON object of each row.
I couldn't find any option DesignView to extract the value but you can achieve same in CodeView by assigning following code to your variable in CodeView.
In below MEETINGID is my column name.
"@items('For_each')?['MEETINGID']"
"imeetingid": "@items('For_each')?['MEETINGID']"
Foreach on a Resultset will return JSON object of each row.
I couldn't find any option DesignView to extract the value but you can achieve same in CodeView by assigning following code to your variable in CodeView.
In below MEETINGID is my column name.
"@items('For_each')?['MEETINGID']"
"imeetingid": "@items('For_each')?['MEETINGID']"
answered Nov 25 at 13:33
Mahesh B
39110
39110
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53247510%2fazure-logic-app-foreach-over-sql-resultset%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
If possible, please add the resultset format in the question. Json ,XML or others? If there is sample data will be helpful.
– Tom Sun
Nov 14 at 9:48
"ResultSets": "Table1": [ A UnitData... , B UnitData... , ... ] "Table2": [ X UnitData... , Y UnitData... , ... ]
– Dani T
Nov 18 at 7:06
This is the output of the SQL query, that divides the results to 1000 rows on each table, each unit data element is a returned row, all tables have same elements structure.
– Dani T
Nov 18 at 7:07