Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sharan
Contributor II
Contributor II

Getting error while reloading the application Automation Monitoring app

I'm encountering an error while reloading the application Automation Monitoring app. It is used to work properly, but for the past8 days, i have been getting this error. Could you please help me to understand the issue?

Sharan_0-1713947028906.png

 

Labels (2)
4 Replies
igoralcantara

The error message "Limit: the limit may not be greater than 200" typically indicates that the REST API has a restriction on the number of records that can be retrieved in a single request. This limit is often set by the API to manage server load and ensure system stability.

Possible solutions:

- Reduce the Limit.

- Use pagination.

Check out my latest posts at datavoyagers.net
Sharan
Contributor II
Contributor II
Author

Thank you so much for your prompt response. Could you please assist us in understanding how to reduce the limit and where. Additionally, I am unfamiliar with pagination. Could you please provide some guidance or share any relevant steps or links?

igoralcantara

I will happy to help you. In your connection properties, turn on With Connection. Here is one example of paging. The parameters I use for this example are based on this REST API documentation. You have to check the parameter names for page. In this case of offset, in a lot of cases is "page".

 

Let vTotalRecords = 500000;
 
let vLimit = 100; 
let vStart = 0;
let vRecordCount = 0;
Let vPrevious_i = 0;
 
 
For i=$(vStart) to $(vTotalRecords) step $(vLimit)
 
LIB CONNECT TO '$(vConnectionSpace):AC-Accounts';
 
    RestConnectorMasterTable:
    SQL SELECT 
        "__KEY_root",
        (SELECT 
            "name",
            "accountUrl",
            "createdTimestamp",
            "updatedTimestamp",
            "contactCount",
            "dealCount",
            "id",
            "__KEY_accounts",
            "__FK_accounts",
            (SELECT 
                "notes",
                "accountCustomFieldData",
                "accountContacts",
                "emailActivities",
                "contactEmails",
                "__FK_links"
            FROM "links" FK "__FK_links")
        FROM "accounts" PK "__KEY_accounts" FK "__FK_accounts"),
        (SELECT 
            "total",
            "__FK_meta"
        FROM "meta" FK "__FK_meta")
    FROM JSON (wrap on) "root" PK "__KEY_root"
    WITH CONNECTION (  
         QUERY "offset" "$(i)"    
         ,QUERY "limit" "$(vLimit)"
 
    );
    
    //Avoid be stuck in a loop that never ends and leave early when reach the end of the table
    //*****************************************************************************************\\
    Let vLoopRecordCount = NoOfRows('RestConnectorMasterTable');
 
    if vLoopRecordCount = 0 Then
    DROP TABLE RestConnectorMasterTable;
        exit for;
    End If;
    //*****************************************************************************************\\
 
 
    [accounts_links]:
    LOAD [notes],
        [accountCustomFieldData],
        [accountContacts],
        [emailActivities],
        [contactEmails],
        [__FK_links] AS [__KEY_accounts]
    RESIDENT RestConnectorMasterTable
    WHERE NOT IsNull([__FK_links]);
 
 
    [accounts]:
    LOAD [name],
        [accountUrl],
        [createdTimestamp],
        [updatedTimestamp],
        [contactCount],
        [dealCount],
        [id],
        [__KEY_accounts],
        [__FK_accounts] AS [__KEY_root]
    RESIDENT RestConnectorMasterTable
    WHERE NOT IsNull([__FK_accounts]);
 
    Let vRecordCount = NoOfRows('accounts');
    
    Trace Loading Accounts - $(vRecordCount) of $(vTotalRecords);
 
    DROP TABLE RestConnectorMasterTable;
    
    //Avoid be stuck in a loop that never ends and leave early when reach the end of the table
    //*****************************************************************************************\\
    
    if vPrevious_i = vRecordCount Then
    Exit for;
    Else
    Let vPrevious_i = NoOfRows('accounts');
    End If;
    
    //*****************************************************************************************\\
  
 
 
Next;

 

Check out my latest posts at datavoyagers.net
Sharan
Contributor II
Contributor II
Author

Thank you so much for your reply. I would be grateful if you could assist me with the following steps:

1)Could you please let me know how to identify the parameters mentioned in the screenshot below?

Sharan_1-1714116218347.png
2)In your previous reply, you mentioned 'vTotalRecords = 500000;' Is this a random value, or how do we define it?

3)In our script, we specified our Tenant URL, but in your script, you mentioned the following WITH CONNECTION: (
QUERY "offset" "$(i)"
,QUERY "limit" "$(vLimit)"