Database Reference
In-Depth Information
"totalRows": "100",
"rows": [
{
"f": [
{
"v": "995"
}
]
}
]
}
pageToken
Specifying a large number of results isn't actually a paging mechanism
however; it is just a way of controlling the size of a page. (Although it might
mean you don't have to do paging because you could get all the results at
once.) The preferred way to page through results is to use a page token .
This is an opaque value that is returned by each list operation and tells
BigQuery where to start in the list the next time the API is called. For
instance, if you get pageToken=@53579480 from a TableData.list()
operation when reading the first 10 rows from a table, you can read the
next 10 rows by passing the same pageToken value in your next request.
Although sometimes the value of the page token may seem predictable, you
should treat it as opaque because the format can change at any time.
Because you have a value threaded through the chain of list() calls,
token-based pagination can give you a stable snapshot of the results. The
BigQuery TableData collection gives you a stable listing; that is, the data
you see when paging will be exactly the data that was present when you
started paging, even if the underlying table changes. Because providing a
stable list operation requires keeping around extra state, the token may be
only valid for a certain period of time—generally 24 hours.
Here you can use curl to get the first row in a table:
$ curl -H "$(python auth.py)"\
"${TABLEDATA_URL}?maxResults=1"
{
"kind": "bigquery#tableDataList",
Search WWH ::




Custom Search