Export query result into csv and store it in azure storage container

MingHui Huang 1 Reputation point


I’m currently using Azure SQL Managed Instance. I red to export the sql query result into csv file and export the file the VM I’m using to access the managed instance or into a azure storage container.

All these have to be automated. And run daily/weekly.

Is there a way to do it?

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,586 Reputation points

    Hi @MingHui Huang , welcome to Microsoft Q&A forum. You can use Azure Logic App to achieve this. Below is the sequence of steps you can create:

    1) Set Recurrence based on requirement and schedule


    2)Create A stored procedure which has the output that you want. Or else you can use normal Execute SQL Query task as well:


    3)Then lastly you can create a blob. Azure Storage Account must be existing one.


    This will create a blob object in the Storage Account. If you want to create CSV file and load we need to add extra step of 'Create CSV table' as per the below article:

    Export Azure SQL database data to CSV files using Azure Logic Apps

    Please let me know if this helps or else we can discuss further on the same.

    Please don't forgot to click on accept it as answer button 135489-image.png wherever the information provided helps you. This can be beneficial to other community members as well.

    0 comments No comments