Need help on Logic apps to enhance the functionality

Rakib 0 Reputation points
2024-01-29T22:09:00.02+00:00

Hello, We are using logic apps to fetch the data from the SharePoint list and save it into a SQL database. As I have more than 50,000 rows of items in the SharePoint list, I save them into a SQL database based on the status field. Basically, if the status is equal to "new," then trigger the flow and store it in a SQL database. How can I save 50,000 items at once? Also, I would like to check the database for existing data. If the date, project number, and unit number fields contains same values in the database, then don't store those records. What do I need to change from the below logic apps to accomplish my project? Thanks in advance User's image

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2024-01-31T11:21:58.6833333+00:00

    @Rakib Thanks for reaching out.

    How can I save 50,000 items at once?

    There is no out of box solution to do it without using the for each action and iterating it. In case if you want the single call to the SQL DB then you can Execute a SQL query (V2) action and build your query dynamically inside the for each action iteration. This would have the same number/a greater number of action execution as you are building the query dynamically inside the for each action and outside the action you will pass the dynamic query.

    If the date, project number, and unit number fields contains same values in the database, then don't store those records.

    The best way would be leveraging the Execute a SQL query (V2) action and in your query do the validated if the records exist or not.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.