Add /current/ alias layer + OC-thumbnail enrichment script#133
Merged
rdhyee merged 1 commit intoisamplesorg:mainfrom Apr 17, 2026
Merged
Add /current/ alias layer + OC-thumbnail enrichment script#133rdhyee merged 1 commit intoisamplesorg:mainfrom
rdhyee merged 1 commit intoisamplesorg:mainfrom
Conversation
Two additions for stable-URL access to rotating versioned parquets: 1. Worker alias route: GET /current/<flavor>.parquet reads current/manifest.json from R2 and 302-redirects to the dated file it points to. Redirect response carries short 5-min Cache-Control so rotation propagates quickly; the target (versioned file) keeps its immutable 1-year cache. DuckDB-WASM / curl / browsers all follow 302s transparently, so range requests hit the target directly. 2. scripts/enrich_wide_with_oc_thumbnails.py: DuckDB LEFT-JOIN script that takes the unified Zenodo wide parquet (thumbnail_url all NULL, see isamplesorg#131) and Eric Kansa's oc_isamples_pqg.parquet (48K thumbnails) and produces an enriched wide file with ~47.7K thumbnails populated for MaterialSampleRecord pids that overlap both. Used today to build and ship isamples_202604_wide.parquet via https://data.isamples.org/current/wide.parquet. The older isamples_202601_wide.parquet stays in place, untouched, still immutable. Verified via DuckDB query through the /current/ URL: 47,717 rows with thumbnail_url populated. Closes the "soft-link" piece of isamplesorg#131. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #131. Adds
/current/<flavor>.parquetWorker redirects for stable URLs that point at rotating dated files, and the DuckDB enrichment script used to buildisamples_202604_wide.parquet(47,717 thumbnails recovered from Eric's OC PQG).isamples_202601_wide.parquetstays untouched./current/wide.parquetnow serves the enriched file.Verified live:
duckdbquery through/current/wide.parquetreturns 47,717 rows with populated thumbnails.