Hey @Anonymous
Try one of the following steps, and it would help:
1) Dont use initialize variable and append to array variable, directly pass the body of parse json inside the create csv table action.
2) If the above does not give the appropriate answer, pass body('Parse_JSON').ResultSets in the csv table action.
3) In the parse json action, pass the ResultSets. Copy the current expression you are passing in parse json, remove it. Paste the expression and write .ResultSets after that.
4) If none of the above method works, send me the test data you are getting from that sql query, I will try it on my end and send you the screenshot of the flow.
For example the test data should look like:
{
"ResultSets":{
"Table1":[
"AccountName":"ABC","first name":"DEF",.....
Like this if you can send the test data, I will do it for you.
Probably you used array because initialize variable and append to array because create csv might be giving you error.
There is no need to use append to array, you can directly pass the body of parse json while initializing the array.
Append to array is used to append a single element at the end of the array or if you are using a loop add elements one by one at the end.
I hope all this will help 🙂