Edit

Share via


Set up pagination to get more data than the page size limit in Azure Logic Apps

Applies to: Azure Logic Apps (Consumption + Standard)

When you get data, items, or records by using a connector action in Azure Logic Apps, you might get result sets so large that the action doesn't return all the results at the same time. For example, the default page size for the SQL Server connector's Get rows action is 2048, but might vary based on other settings.

For some actions, the number of results might exceed the connector's default page size. In this case, the action returns only the first page of results.

Some actions let you turn on a pagination setting so that your logic app can retrieve more results up to the pagination limit. The action returns those results as a single message when the action finishes.

When you use pagination, you must specify a threshold value, which is the number of results you want the action to return. The action gets results until reaching your specified threshold. When your total number of items is less than the specified threshold, the action gets all the results.

Turning on the pagination setting retrieves pages of results based on a connector's page size. This behavior means that sometimes, you might get more results than your specified threshold. For example, when using the SQL Server Get rows action, which supports pagination setting:

  • The action's default page size is 2048 records per page.
  • Suppose you have 10,000 records and specify 5000 records as the minimum.
  • Pagination gets pages of records, so to get at least the specified minimum, the action returns 6144 records (3 pages x 2048 records), not 5000 records.

Here's a list of some of the connectors where you can exceed the default page size for some actions:

Prerequisites

Turn on pagination

To determine whether an action supports pagination in the workflow designer, check the action's settings for the Pagination setting.

  1. In the Azure portal, open your logic app resource.

  2. Based on the logic app type, follow the corresponding steps:

    • Consumption: On the resource sidebar menu, under Development Tools, select the designer to open the workflow.

    • Standard: On the resource sidebar menu, under Workflows, select Workflows. Select the workflow that you want to open the designer.

  3. On the designer, select the action. On the information pane that opens, select Settings.

    If the action supports pagination, under Networking, the Pagination setting is available.

  4. Change the Pagination setting from Off to On.

    Screenshot shows the action information pane with the Settings tab, Pagination set to On, and a Threshold value.

  5. In the Threshold property, specify an integer value for the target number of results that you want the action to return.

  6. Save your workflow. On the designer toolbar, select Save.

Workflow definition - pagination

When you turn on pagination for an action that supports this capability, your logic app's workflow definition includes the "paginationPolicy" property along with the "minimumItemCount" property in that action's "runtimeConfiguration" property, for example:

"actions": {
   "HTTP": {
      "inputs": {
         "method": "GET",
         "uri": "https://www.testuri.com"
      },
      "runAfter": {},
      "runtimeConfiguration": {
         "paginationPolicy": {
            "minimumItemCount": 1000
         }
      },
      "type": "Http"
   }
},

In this case, the response returns an array that contains JSON objects.

Get support