Azure SQL, Power Automate and JSON
Good day, dear friends,
Importing JSON data to SQL can be tricky and cumbersome. There are numerous ways to do it. My new favourite is Power Automate.
In this example will use Power Automate Parse JSON connector and Azure SQL connection. It allows you great flexibility, along with a visual interface.
Let's say you have the following JSON you need to import to Azure SQL.
{ "book":[ { "id":"444", "language":"C", "edition":"First", "author":"Dennis Ritchie " }, { "id":"555", "language":"C++", "edition":"second", "author":" Bjarne Stroustrup " } ] }
First, let's create an Azure SQL database:
and call it books
Let's create a Power Automate. For simplicity's sake, it will be manually triggered flow. It will hold JSON string as a variable.
Now, we can use an amazing option to generate a schema from a sample. For we need to use data operation, "Parse JSON"
And Voila, in Power Automate Dynamics Content, you can see your JSON variable.
Save and Run your Flow.
Your data will be in Azure SQL.
Below is the image of the entire flow
Let me know if you have any questions and/or comments
Conseiller stratégique chez Microsoft pour le secteur de la santé publique du Québec.
4 å¹´Part 2 should be using custum SQL queries with JSON parsing SQL actions. ;) 1 call, 1000 inserts.