Speed up Logic Apps execution with Select Data Action
    • Dark
      Light
    • PDF

    Speed up Logic Apps execution with Select Data Action

    • Dark
      Light
    • PDF

    Article Summary

    #ServerlessTips - Azure Logic Apps
    Author: Mandar Dharmadhikiri Business & Integration Architecture Manager

    Often, when integrating with a backend data serving API, you would need to filter out certain properties and return a subset as a DTO to the consumer. In Logic Apps, the standard way of doing this is to use the foreach action with a combination of the array type variable. Let's say your Logic App calls a user information API which returns a JSON array, as shown below

    download 281

    and you want to pass following JSON to the consumer
    download 291

    You can implement a simple logic app for this as shown below

    download 301

    While this logic app will work, it will start causing performance problems when the number of records that are to be looped through increases, this can be mitigated to a level by enabling For each parallelism

    download 311

    This also is not sufficient. The most efficient way to solve this problem is to use the Select Operation and map the necessary properties as shown below

    download 321

    A sample comparison for the execution time for 1000s records processed through the three approaches is shown in the table below
    download 331

    As it is evident, using Select operation helps speed up simple mapping scenarios for large datasets

    MicrosoftTeams-image 503


    Was this article helpful?