3

In the getData() function I'm sometimes seeing some calls with a request that contains

pagination={startRow=1.0, rowCount=100.0}

and they seem to be ones that also have

scriptParams={sampleExtraction=true}

However, I can't see any documentation on pagination. Is this a stable feature? Will there ever be a request for a startRow that isn't 1.0?

I'm asking since to make robust pagination for some of our data sources may not be trivial, so would like to know if it's worth the effort.

Michal Charemza
  • 25,940
  • 14
  • 98
  • 165
  • The `sampleExtraction` is explained in [Semantic Extraction](https://developers.google.com/datastudio/connector/semantics#semantic-type-detection) but I've never got it in my connector. The ´pagination´ occured only once and I wasn't able to invoke it manually. But the meaning is clear. Use it if your API supports something like `LIMIT` and `OFFSET` (Limit x Page) as you will find in SQL statements as explained [here](https://www.w3schools.com/php/php_mysql_select_limit.asp). Ignore it if you API does not support pagination. It's an option to reduce the data transferred and increase the speed. – Matthias May 14 '20 at 10:50
  • `sampleExtraction` is explained [here](https://developers.google.com/datastudio/connector/semantics#semantic-type-detection). It is only invoked if your schema (data fields) do not define any semantic type. It is recommended to define the semantics manually. – Matthias May 14 '20 at 16:32

1 Answers1

1

According to this answer, made by Minhaz Kazi (Google's Data Studio developer), Community Connectors do not support pagination for web APIs at present.

I also tried to implement pagination and it doesn't work. Indeed, there are some weird requests made by Data Studio that makes you think you can do more than it is documented.

Diego Queiroz
  • 3,198
  • 1
  • 24
  • 36