Skip to main content

Pagination

The endpoint does not provide offset or cursor pagination. The result set per query is bounded via the limit argument and via filters on a suitable column.

Row limit

PropertyValue
Maximum value of limit10 000
Behaviour without limitas limit: 10 000 with overflow check
Result orderingundefined

There is no silent truncation: a query whose result set exceeds the limit is rejected with an error.

Error messages

For a limit value above 10 000:

limit cannot exceed 10000 rows per query

For a query without limit whose result set exceeds the limit:

Query returned more than 10000 rows. Please narrow your query using
filters or specify a limit.

Iteration over filter windows

Larger result sets are split into several queries with disjoint filter windows. The choice of filter field follows from the table's available filters. Typical patterns are time windows over timestamp, iteration over stations, or iteration over another discriminating key of the table.

query Window($from: AWSDateTime!, $to: AWSDateTime!) {
water {
observations {
data_1day_mean(
where: {
station: { no: { _eq: "2009" } }
timestamp: { _gte: $from, _lt: $to }
}
) {
timestamp
value
unitSymbol
}
}
}
}

The windows are concatenated client-side in the desired order. Example code is available under Python.

Window size

The appropriate window size depends on the expected number of rows per window. It must be chosen so that each query reliably stays below 10 000 rows, with margin for the typical variability of the data density. The expected data density is described on the respective dataset page.