Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pagination when data source is supporting multi page requesting

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?

like image 267
contributorpw Avatar asked Oct 28 '22 23:10

contributorpw


1 Answers

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.

like image 178
Minhaz Kazi Avatar answered Nov 17 '22 20:11

Minhaz Kazi