1

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 .

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241

1 Answers1

4

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

Hury Shen
  • 14,948
  • 1
  • 9
  • 18
  • thank for the reply, It worked well. I have one questions, does elastic search works on blob storage ? – Varanasi Phaneendra Jun 07 '21 at 13:27
  • @VaranasiPhaneendra Sorry I'm not clear about elastic search, so I'm not sure if it can work on blob storage. If my solution above helps your problem, could you please accept it as answer. Thanks in advance. – Hury Shen Jun 21 '21 at 08:52
  • Here, I have one observation. During course of time if azure storage acquire million or trillions of files, what is best practice to read those files for displaying in a front-end application which is build upon Angular. I have though of reading through .NET Web API but I'm thinking about scalability of storage. If later time file count increases does Web API becomes slow in fetching records. @Hury Shen I suggestions/best practice to read those files and display them in UI – Varanasi Phaneendra Jun 21 '21 at 14:32
  • How can I insert the filenames which are inside the attachment into SQL – Varanasi Phaneendra Jul 02 '21 at 06:24