The reproducible definition of how the source.gleif Dataset is ingested from the GLEIF golden copy. The fetch is an opaque command by design — the golden copy is republished daily and its URL is resolved at run time from a JSON API (not a stable, pinnable link), and it is a ~470 MB zip, so forcing it into a typed link-discovery operator would misrepresent the work. Everything downstream of the raw CSV is first-class config: normalise to the published ten-field schema, materialise, export a reproducible Parquet, describe and gate.
producessource.gleifGLEIF — Legal Entity Identifiersfinetype gate — pending
This Protocol has no finetype gate step yet. Its schema.finetype.json is derived from — and committed on — the first successful full-scale run, the same way as the other Datasets; the gate step is added to the manifest then, so it is not shown as a promise the pipeline does not yet keep.
The flow
Every step runs in order. op: steps are typed, versioned operators; sql: steps are DuckDB models; a command step is opaque by design.
- 01fetch_gleifcommand
Resolve the current full-file CSV URL from the GLEIF publishes JSON API, download (~470 MB zip), unzip. Opaque command by design — a daily-rotating, non-pinnable URL that is not an HTML href.
producesgleif_rawcommandbash scripts/fetch_gleif.sh build/gleif_srcprecondition: skip if build/gleif_src was modified within the last 24h.
- 02loadsql: models/load.sql
Normalise to the published ten-field schema (dates sliced from the ISO timestamps).
readsgleif_rawmodelmodels/load.sql - 03packagesql: models/package.sql
Materialise the terminal table (adds the search corpus).
producesgleif_outmodelmodels/package.sql - 04export_gleifop: parquet_export@1
Write the terminal Parquet. The total order_by (lei is unique) makes the bytes reproducible for a given golden-copy snapshot.
readsgleif_outproducesbuild/gleif.parquetwithinput: gleif_out dest: build/gleif.parquet compression: zstd order_by: country, legal_name, lei - 05describeop: datapackage_describe@1
Emit datapackage.json — finetype types every column; descriptor.overrides.json overlays the curated identity, licenses, sources, per-field prose and primaryKey. Hard-fails on drift.
readsbuild/gleif.parquetdescriptor.overrides.jsonproducesdatapackage.jsonwithparquet: build/gleif.parquet overrides: descriptor.overrides.json out: datapackage.json