Read list of files in azure blob storage folder using Logic Apps and insert file names with extension into Azure SQL

5.4k views Asked by At

I'm learning Azure Logic Apps work flow, I have extracted archive into folder in blob storage.

Now, I need to read files names with extension in extracted path and insert those file name into Azure SQL database.

Kindly could I get help in achieving this .

1

There are 1 answers

4
Hury Shen On

To implement this requirement, you can refer to my steps below:

1. Use "List blobs" to list all of the blobs in your folder in storage.

enter image description here

2. Then add "For each" loop in your logic app to loop the value from "List blobs". And in "For each" loop, use "Insert row(V2)" to insert each file name into your sql table.

enter image description here

By the way, before the step2 I have already created a table named FilesTable in my azure sql db like below screenshot:

enter image description here

And when you use "For each" loop to insert the rows, it's better for us to enable "Concurrency Control" and set Degree of Parallelism to 1 to escape concurrency issue. Please do it as below:

enter image description here

enter image description here