Reputation: 447
I am not getting all the rows from my Datastax Astra DB where I have uploaded my data. I am using python http_methods
for requesting data. Here is my code-
respond = astra_client.request(
method=http_methods.GET,
path=f"/api/rest/v2/keyspaces/{ASTRA_DB_KEYSPACE}/{astra_db_collection}/rows")
This method is only getting me 100 rows, while there are 150 rows in my table. How can I solve this ?
Upvotes: 0
Views: 359
Reputation: 378
The default page size for this endpoint is 100. To return more rows you'll want to set the query param .../rows?page-size=N
.
If your page size is smaller than the total dataset you would like to return you'll need to use paging. This can be accomplished with page-size=N&page-state=SOME_PAGE_STATE
where SOME_PAGE_STATE
is the string returned in the pageState
field of the response body.
Upvotes: 1