Seven DuckDB views register on session open: long (raw), spending_long and revenue_long (prefix-filtered, NOT is_aggregate per reader-spec §4), canonical_fips_xwalk and summary_categories (identity), spending_annotated and revenue_annotated (LEFT JOIN xwalk + categories for verb composition). File prefix `NN-` enforces creation order so *_annotated views resolve their *_long dependencies. Deviation from plan: series_breaks/cpi_annual/legacy_aggregate_map and *_with_transforms views are deferred — their backing parquets are not in the v0.1 corpus (manifest.files.metadata only lists canonical_fips_xwalk and summary_categories). The verbs will compute CPI adjustment verb-side against a bundled cpi table in a later task.
6 lines
132 B
SQL
6 lines
132 B
SQL
CREATE OR REPLACE VIEW spending_long AS
|
|
SELECT *
|
|
FROM long
|
|
WHERE LEFT(item_code, 1) IN ('E', 'F', 'G', 'K')
|
|
AND NOT is_aggregate;
|