Skip to content

Commit d56f47a

Browse files
authored
Merge pull request #5 from sabino/feat/m1-jaffle-parse
Add seed ref parsing
2 parents f372a36 + 3f696c3 commit d56f47a

12 files changed

Lines changed: 287 additions & 39 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# M1 Seed Ref Slice
2+
3+
## Scope
4+
5+
This slice adds read compatibility for CSV seeds in the native Zig parser. It is parser/artifact-only and does not execute or load seed data.
6+
7+
Implemented surface:
8+
9+
- `seed-paths` from `dbt_project.yml`, defaulting to `seeds`.
10+
- Recursive `.csv` seed discovery under configured seed paths.
11+
- Seed nodes with `seed.<package>.<name>` unique IDs.
12+
- Duplicate seed-name diagnostics for basename collisions across recursive seed paths.
13+
- Literal `ref()` resolution to active models first, then active seeds.
14+
- Seed entries in manifest `nodes`, `parent_map`, `child_map`, and `dxt ls`.
15+
- `dxt ls --resource-type seed`.
16+
17+
## Compatibility Notes
18+
19+
The slice exists to unblock public Jaffle Shop DuckDB parse read-compatibility, where staging models reference CSV seeds such as `raw_customers`, `raw_orders`, and `raw_payments`.
20+
21+
Seed execution, CSV type inference, catalog generation, and full dbt seed artifact fidelity remain later work. The partial manifest intentionally records only the fields needed by the current M1 graph and selector surface.
22+
23+
## Validation
24+
25+
Synthetic fixtures cover deterministic seed discovery, seed-aware `ref()` dependency resolution, parent/child maps, seed listing, and duplicate seed-name diagnostics. The public Jaffle Shop DuckDB clone is used as a non-committed manual gate and parses into a partial manifest with five model nodes and three seed nodes.

PLAN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Exit criteria:
514514

515515
- M0 is under PR review as the Zig `0.16.0` runtime scaffold.
516516
- M1 has started on stacked branches with native Zig artifact-first parser slices.
517-
- `dxt parse` now targets the supported Tier 0 subset: project name/model paths, SQL model discovery, literal `ref`, literal `source`, inline `config(materialized=..., tags=...)`, narrow YAML model properties for scalar descriptions, simple columns, tags, materialization, disabled SQL models, dependency maps, and deterministic partial `manifest.json`. Generic tests are parsed for later graph work but are not yet emitted as dbt-shaped `test.*` nodes.
517+
- `dxt parse` now targets the supported Tier 0 subset: project name/model paths/seed paths, SQL model discovery, CSV seed discovery, literal `ref` to models or seeds, literal `source`, inline `config(materialized=..., tags=...)`, narrow YAML model properties for scalar descriptions, simple columns, tags, materialization, disabled SQL models, dependency maps, and deterministic partial `manifest.json`. Generic tests are parsed for later graph work but are not yet emitted as dbt-shaped `test.*` nodes.
518518
- `dxt ls` now lists resources from the same parser graph with stable text/JSON output and basic name, tag, path, resource type, and exact exclude filters.
519-
- Synthetic fixtures cover one model, model refs, source refs, combined source/model YAML, inline config/tag selection, YAML model properties and columns, disabled models, disabled ref diagnostics, unmatched model-property warnings, duplicate model diagnostics, unsupported dynamic ref diagnostics, and unsupported macro-call diagnostics.
520-
- The next M1 slices should add published schema validation, docs blocks, macros, stronger selector parity, and Jaffle Shop DuckDB parse exploration.
519+
- Synthetic fixtures cover one model, model refs, seed refs, source refs, combined source/model YAML, inline config/tag selection, YAML model properties and columns, disabled models, disabled ref diagnostics, unmatched model-property warnings, duplicate model diagnostics, unsupported dynamic ref diagnostics, and unsupported macro-call diagnostics.
520+
- The current M1 manual gate parses the public Jaffle Shop DuckDB project into a partial manifest with SQL models and CSV seeds. The next M1 slices should add published schema validation, docs blocks, macros, generic test nodes, stronger selector parity, and deeper Jaffle artifact parity.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Implemented pre-alpha commands:
3535
./zig-out/bin/dxt ls --project-dir tests/fixtures/model_ref --output json
3636
```
3737

38-
`parse` and `ls` currently support only the documented M1 parser subset: `dbt_project.yml` name/model paths/target path, SQL model discovery, literal `ref`, literal `source`, basic inline `config`, narrow YAML model properties for scalar descriptions, simple columns, tags, materialization and disabled SQL models, deterministic partial `manifest.json`, and simple name/tag/path/resource filters. dbt-shaped generic test nodes, `compile`, `build`, and `docs generate` remain planned placeholders.
38+
`parse` and `ls` currently support only the documented M1 parser subset: `dbt_project.yml` name/model paths/seed paths/target path, SQL model discovery, CSV seed discovery, literal `ref` to models or seeds, literal `source`, basic inline `config`, narrow YAML model properties for scalar descriptions, simple columns, tags, materialization and disabled SQL models, deterministic partial `manifest.json`, and simple name/tag/path/resource filters. dbt-shaped generic test nodes, `compile`, `build`, and `docs generate` remain planned placeholders.
3939

4040
## Development
4141

0 commit comments

Comments
 (0)