Pagination when data source is supporting multi page requesting

元气小坏坏 提交于 2021-02-07 14:45:45

问题


Does Google Data Studio Community connector support pagination?

I work with an external data service. The service returns data page by page. It requires start and next parameters and it requires 2 req/sec. Can I override a method like getData or upgrade request argument for implement this feature?

If it's not. Is there the best practice for getting data of this kind?


回答1:


Community Connectors do not support pagination for web APIs at present.

The best practice would depend on your use case. If you want to get the full dataset for user, you can make multiple UrlFetch calls to get the full dataset, merge it, and return the merged set as the getdata() response. It might also make sense to cache this result to avoid making a large number of requests in the short term. You can cache using Apps Script cache, or a Sheet, or even to BigQuery. Keep in mind that Apps Script has 6 min / execution limit.

However, if you want to return only specific pages, the only way to configure that would be through getConfig since configparams are passed with the getData() request. Example use case would be returning only first n number of pages where n selected by user in the config.



来源:https://stackoverflow.com/questions/47165247/pagination-when-data-source-is-supporting-multi-page-requesting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!