Skip to content

Cache online data#500

Open
teunbrand wants to merge 7 commits into
posit-dev:mainfrom
teunbrand:cache_online_data
Open

Cache online data#500
teunbrand wants to merge 7 commits into
posit-dev:mainfrom
teunbrand:cache_online_data

Conversation

@teunbrand

@teunbrand teunbrand commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This PR advances #453.

This mechanism is separate enough from #453's goal that I think could be reviewed as a separate PR.
Essentially, it adds cached, online versions of the builtin data, so that e.g. FROM online:us_states will download and cache some preformatted parquet file.

Notably the caching mechanism needs a different implementation for WASM as I don't think the file system works the same way and maybe there might be some trusted source thingies going on. I've only implemented the non-WASM path, but left a hook to slot WASM into.

teunbrand and others added 7 commits June 30, 2026 10:44
Prepares for the addition of an online_data module by giving the
existing builtin-dataset module a more specific name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the ggsql-specific `extract_builtin_dataset_names` with a
prefix-parameterised `extract_prefixed_dataset_names` and extend
`rewrite_namespaced_sql` to also handle the `online:` prefix.
Adds `naming::online_data_table()` for the new namespace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces `online:world`, `online:states`, `online:us-counties` (and
resolution/alias variants) as data sources that auto-download and cache
Natural Earth parquet files. The download logic is native-only (ureq);
the registry and parquet parsing are platform-independent so wasm can
supply its own fetch implementation later.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant