Qliksense REST连接器的json总记录路径是什么?

时间:2019-03-05 13:44:30

标签: json qliksense

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

enter image description here

这是我需要放入的地方。

enter image description here

1 个答案:

答案 0 :(得分:1)

您的总分页网址取决于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)