Skip to main content

Read every row in a large data source

By Steven Van ·

A single data source query returns at most 10,000 results, so plain pagination can silently miss rows.

Notion has added two helpers, iterateAllDataSourceRows() and collectAllDataSourceRows(), to page past the 10,000-result limit on a single data source query. Plain pagination can silently miss rows at that limit; the new helpers page past it using the windowing approach from the Query large data sources guide, de-duplicating rows as they go.

Use the iterator to stream rows, or the collect function to gather them into an array when the full result fits in memory. See the changelog for details.

Notion
Notion
All-in-one workspace for notes, docs, projects, and wikis — with AI built in for writing, summarizing, and organizing.
View Notion →

Read the original announcement →

Read Read every row in a large data source on Creators Toolbox