【问题标题】:What is the json total records path for Qliksense REST connector?Qliksense REST 连接器的 json 总记录路径是什么?
【发布时间】:2019-03-05 13:44:30
【问题描述】:

我有一个来自 Outreach API 的 json 响应,对于 qliksense REST 连接器中的分页,我需要通过总记录路径。跟随 json 响应的路径是什么?

这就是我需要把它放进去的地方。

【问题讨论】:

    标签: json qliksense


    【解决方案1】:

    总分页的嗨 url 取决于 API。或者,您可以尝试分块调用 API 并检查更多。来自其他 API 的示例:

    SUB getOnePage(vOffset)
    
      LIB CONNECT TO [outreach_api];
    
      RestConnectorMasterTable:
      SQL SELECT 
      (...)
      FROM JSON (wrap on) "root" PK "__KEY_root"
      WITH CONNECTION (Url "https://api.outreach.io/api/v2/prospects?page[limit]=100&page[offset]=$(vOffset)");
    
      LET vHasMore = Peek('has-more',-1); 
      /* you need to find parametr which detects more rows or alternatively
      count returned number of records is more than 0 */
    
      LET vNext = Peek('next',-1);
    
      DROP Table root;
    
      IF vHasMore = 'True' then
    
        CALL getOnePage($(vNext));
    
      EndIf
    
    EndSub
    
    CALL getOnePage(0)
    

    【讨论】:

      猜你喜欢
      • 2014-06-30
      • 2011-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多