I'm using the newly released Redshift Data API.
I'd like to programmatically paginate the query results which are returned from the getStatementResult action.
According to the API reference, getStatementResult returns a NextToken property, which implies it supports pagination.
However, I couldn't find a Limit or MaxResults argument:
https://docs.aws.amazon.com/redshift-data/latest/APIReference/API_GetStatementResult.html
To make things more confusing, the CLI operation does support pagination using the --starting-token and --max-items arguments:
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift-data/get-statement-result.html
So, my questions are:
- Is it possible to paginate
getStatementResultresults programmatically? - If not, then what's the meaning of the
NextTokenwhich is returned fromgetStatementResult? What is the default page size?
Thanks!