Export CSV results to file - Bad Request Error Message

Neil-LinguaBuddy 21 Reputation points
2021-03-15T11:43:25.4+00:00

I'm trying to create a simple recurring data export from an Azure SQL database. using Azure Logic Apps.

I want the process to be

  • Time recurrance
  • Run query
  • Export results to Storage account

However, I'm unexpectedly failing due to the error message displayed below:

"BadRequest. The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'."

I cannot find any documentation shedding any light on this, and I definitely wasn't expecting an error message of this type from a "no code" solution.

I have tried skipping this step, but the file export is simple a file without a format, so I have to create a csv within the workflow. Any CODE FREE ideas how to correct / work around this?

77802-image.png

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,307 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,791 Reputation points
    2021-03-16T03:45:43.47+00:00

    Hi @Neil-LinguaBuddy

    Welcome to Microsoft Q&A! Thanks for posting the question.

    As per the error, the input type is Object where the action Create CSV Table accepts the input type in Array.
    If you check the output of your action execute sql query (V2) it will be dynamic. The response will be as below:

    {  
      "ResultSets": {  
        "Table1": [  
          {  
            "Column1": "Value1",  
            "Column2": "Value2",  
            "Column2": "Value3",  
            "Column4": "Value4"  
          }  
        ]  
      },  
      "OutputParameters": {}  
    }  
    

    To get the array values from the above output in the create csv table you need to traverse to Table1 as below. If you scroll down at the last of your dynamic content you will see the below dynamic content.

    78066-image.png

    78065-image.png

    Hope the above helps you to resolve the issue. Please let me know if you need any assistance.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.