数据源支持多页请求时的分页 [英] Pagination when data source is supporting multi page requesting

查看:55
本文介绍了数据源支持多页请求时的分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Data Studio Community连接器是否支持分页?

Does Google Data Studio Community connector support pagination?

我使用外部数据服务.该服务逐页返回数据.它需要 start next 参数,并且需要2 req/sec.我可以覆盖诸如 getData 之类的方法,还是升级 request 自变量来实现此功能吗?

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?

推荐答案

社区连接器目前不支持Web API的分页.

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

最佳实践将取决于您的用例.如果要获取用户的完整数据集,则可以进行多个 UrlFetch 调用以获取完整的数据集,将其合并,然后将合并后的集合作为 getdata()返回.回复.缓存此结果以避免在短期内发出大量请求也是有意义的.您可以使用 Apps脚本缓存 6分钟/执行限制

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.

但是,如果只想返回特定页面,则唯一的配置方法是通过 getConfig ,因为 configparams getData()一起传递请求.用例示例仅返回前n个页面,其中n个是用户在配置中选择的.

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.

这篇关于数据源支持多页请求时的分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆