T-117: M1.2ag — data-pipeline: read-only MongoDB → concatenated raw-BSON file exporter for the collections curate-etl consumes (raw: true cursor, byte pass-through, atomic publish) with tests and local benchmark
This commit is contained in:
parent
c0afe5e3f0
commit
0962f66cc3
9 changed files with 2436 additions and 1 deletions
|
|
@ -1468,3 +1468,12 @@ Measured locally (`2026-11-29`, default `500,000` rows; two back-to-back runs wi
|
|||
```
|
||||
- **Key-namespace alignment between `qmFilings` and `qmEarnings`:** `qmFilings` defaults to `symbol` while `qmEarnings` defaults to `qmSearchCode`. Both exports must carry an unambiguous key in the `provider_mapping` namespace (for example, the QuoteMedia security ID, not a bare ticker — the security master records distinct QuoteMedia IDs such as `VOY:CNX` and `VOY:CC` for the same symbol and exchange, so switching earnings to bare `symbol` can merge distinct identities or drop rows). If a live `qmFilings` export lacks that unambiguous key, prepare the export with verified QuoteMedia IDs and exclude unresolved rows rather than downgrading `qmEarnings` to bare tickers.
|
||||
- **In-RAM buffering & single-threaded execution:** decoded filings and earnings are buffered in RAM (with shared `Arc<str>` key interning) before sorting/curation; `rayon` key-sharded streaming, direct MongoDB/PostgreSQL connections, and M2 `fundamentals_pit` joins remain out of scope.
|
||||
|
||||
## Exporting Input Files (`data-pipeline`)
|
||||
|
||||
All `curate-*` commands read local TSV and concatenated raw-BSON files produced by the read-only exporters in `@stock-bot/data-pipeline`:
|
||||
|
||||
- **PostgreSQL security-master TSVs (`provider_mapping.tsv`, `listing_currencies.tsv`, `delistings.tsv`):** `apps/stock/data-pipeline/src/security-master/run-export-curate-inputs.ts`
|
||||
- **MongoDB concatenated raw-BSON files (`<collection>.bson`):** `apps/stock/data-pipeline/src/security-master/run-export-raw-bson.ts`
|
||||
|
||||
See [apps/stock/data-pipeline/README.md](../../apps/stock/data-pipeline/README.md#read-only-raw-bson-exporter-export-raw-bsonts) for flags, read-only safety guards, and the full M1 Step 2 execution order (`run-export-curate-inputs.ts` → `run-export-raw-bson.ts` → `curate-etl curate-*`).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue