Export data from Azure SQL database to blob in csv format using Logic Apps

Anonymous
2023-02-01T21:19:55.18+00:00

hi,

I am trying to export data from Azure SQL to Blob Storage. I need data in CSV format.
I have added below connectors - so I run Proc, Parse the result, initialize an array type variable which gets the result from Parse JSON 2, and then Create CSV Table.
After this when I try to Create Blob, or Create File, I do not get any input in dynamic content which can be used as File Content. I am not sure where I am going wrong. The dynamic content window says

User's image

Azure SQL Database
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,427 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,842 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,471 Reputation points
    2023-02-06T08:38:21.3066667+00:00

    @Mahandru, Nidhi Thanks for reaching out. As Create File action File Content accepts binary type therefore by default it will not show sting or any data type. In case if your file content is string then you can pass the string value too if it is not binary and you can click on See more on parameters/variable option so it will show all the list that is available, and you can select as per your need.

    Let me know if you have any queries or concerns.

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

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Khurram Rahim 1,841 Reputation points
    2023-02-08T11:02:57.0033333+00:00

    It sounds like you are trying to use Azure Data Factory to export data from Azure SQL to Blob Storage in a CSV format. To do that, you need to follow these steps:

    1. Connect to Azure SQL and fetch the data using a SQL query.
    2. Use a "Parse JSON" action to parse the data and extract the columns.
    3. Use a "Create CSV Table" action to convert the parsed data into a CSV format.
    4. Use a "Create Blob" or "Create File" action to store the CSV data in Blob Storage.

    If you are unable to get the input for "File Content" in the dynamic content, make sure that the previous actions are properly connected and the outputs are valid. If you are still encountering the issue, please provide more details about the error message and the version of Azure Data Factory you are using.

    0 comments No comments