question

Yomi-5388 avatar image
0 Votes"
Yomi-5388 asked WayneF-9947 edited

Logic App- Export file from SQL Sproc resultset to CSV

I am trying to copy SQL table (object) resultset to a CSV format using Logic App but I keep getting this error (screenshot). ANY help is welcome

68303-error.png


sql-server-generalazure-logic-apps
error.png (17.1 KiB)
error.png (12.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

There is no screenshot in you post. Which exact error message do you get; please post it as text?

0 Votes 0 ·

@OlafHelper-2800 It fail on Create CSV Table with this error ---BadRequest. The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.---

0 Votes 0 ·
Yomi-5388 avatar image
0 Votes"
Yomi-5388 answered AmeliaGu-msft commented

@OlafHelper-2800 I added parse json, initialize variable and Append to array variable step respectively between Execute stored procedure and CSV and it worked. Thank you so much for helping

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Yomi-5388,
I am glad to know that your issue has been resolved.
In order to close this thread, please kindly accept your reply as answer to help other community members find the helpful reply quickly. Your contribution is highly appreciated.
Best Regards,
Amelia

0 Votes 0 ·
WayneF-9947 avatar image
0 Votes"
WayneF-9947 answered WayneF-9947 edited

Also this should work:
In the Create CSV table component and in the "From" field , code an expression like:
outputs('Execute stored procedure (V2)')?['body/resultsets/Table1'].
This will return the 1st (or only) resultset as an Array

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.