Skip to content

Page datastore records past HDX's row cap, warn on truncated SQL results, and document TDE - #117

Merged
mcarans merged 1 commit into
mainfrom
datastore-truncation-and-tde-docs
Oct 15, 2026
Merged

mcarans merged 1 commit into
mainfrom
datastore-truncation-and-tde-docs

Conversation

@nadineisabel

Copy link
Copy Markdown
Member

@mcarans can you review this?

Makes the 6.7.1 datastore helpers hold up against HDX's 32,000-row cap, and ties the Datastore docs to HDX's Tabular Data Endpoints (TDE).

  • get_datastore_records pages on the limit HDX applies. HDX lowers any limit above 32,000 to 32,000 and returns the value it used. Paging reads that value, so a page_size of 50,000 still yields every matching row.
  • search_datastore_sql warns on a cut-off result. HDX stops a SQL result at 32,000 rows and sets records_truncated. The method logs a warning and returns the records it got.
  • The Datastore docs name TDE and link its GitBook page. They say TDE covers only resources with datastore_active true, give hdx@un.org for requests, and state the limit of 60 requests per minute per IP. search_datastore_sql documents the cap and the warning, linking GitBook's pagination guidance.
  • The test mock caps rows and returns the applied limit, as CKAN 2.11 does. Both new cases fail on main and pass here.

test_resource.py 25 passed, ruff clean. The 3 test_update_logic.py failures need /tmp/WHO/health_indicators_ZMB.csv and fail the same way on main.

@nadineisabel
nadineisabel requested a review from mcarans October 14, 2026 09:03
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Test Results

180 tests  ±0   180 ✅ ±0   1m 17s ⏱️ -18s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 49a894a. ± Comparison against base commit 6832186.

♻️ This comment has been updated with latest results.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 97.259% (+0.004%) from 97.255% — datastore-truncation-and-tde-docs into main

@mcarans mcarans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on stage and fixes the page size > 32,000 bug. Looks good

@mcarans
mcarans merged commit 2ef3d77 into main Oct 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants