You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agent/research/dbt-upstream-reference-map.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ Every compatibility slice should record:
55
55
| Adapter capability and SQL identity | v1 adapter behavior is distributed across adapters and context providers |`crates/dbt-adapter-core/src/lib.rs::AdapterType`, `quote_char`, static-analysis support matrix, microbatch capability; `crates/dbt-adapter-sql/src/ident.rs`, `statements.rs`, `types/*`| Future `src/project/adapter.zig`, `src/project/sql.zig`, and cross-database planner modules |
56
56
| DuckDB SQL model execution and run results | `schemas/dbt/run-results/v6.json`; `core/dbt/artifacts/schemas/run/v5/run.py::RunResultOutput`, `process_run_result`, `RunResultsArtifact.from_execution_results`; `core/dbt/compilation.py::Compiler.compile_node`, `write_graph_file` | `crates/dbt-auth/src/duckdb/mod.rs::DuckDbAuth.configure`; `crates/dbt-loader/src/dbt_macro_assets/dbt-duckdb/macros/adapters.sql::duckdb__create_table_as`, `duckdb__create_view_as`; `crates/dbt-loader/src/dbt_macro_assets/dbt-duckdb/macros/materializations/table.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/models/view.sql`; `crates/dbt-schemas/src/schemas/run_results.rs::RunResultOutput`, `RunResultsArtifact`; `crates/dbt-tasks-core/src/stats_to_results.rs`, `utils.rs::build_run_results_artifact` | `src/project/duckdb.zig` owns the first CLI-backed DuckDB execution slice, local-file path guardrails, and table/view SQL rendering; `src/project.zig` currently owns selected-model dependency ordering until a runner module exists; `src/project/run_results.zig` owns the minimal v6 run-results writer; future adapter ABI should replace the CLI backend with embedded DuckDB/linking and add task timing, adapter responses, relation staging, DAG scheduling, seeds, and tests |
57
57
| DuckDB seed build execution and run results | `core/dbt/parser/seeds.py::SeedParser`; `core/dbt/artifacts/resources/v1/seed.py::SeedConfig`, `Seed`; `core/dbt/context/providers.py::load_agate_table`; `core/dbt/task/seed.py::SeedRunner`, `SeedTask`; `core/dbt/task/build.py::BuildTask.RUNNER_MAP`; `core/dbt/artifacts/schemas/run/v5/run.py::process_run_result`; `schemas/dbt/run-results/v6.json` | `crates/dbt-parser/src/resolve/resolve_seeds.rs`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/seeds/seed.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/seeds/helpers.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-duckdb/macros/seed.sql`; `crates/dbt-adapter/src/adapter/mod.rs::get_seed_file_path`; `crates/dbt-schemas/src/schemas/run_results.rs::RunResultOutput` | `src/project/duckdb.zig` owns the first root-project CSV seed load SQL and file-path rendering; `src/project.zig` owns the seed-only `build` boundary until a runner module exists; `src/project/run_results.zig` owns null compiled fields for seed results; future work must add package seed roots, seed configs, `dxt seed`, mixed build DAG scheduling, and full materialization semantics |
58
+
| DuckDB generic test execution and run results | `core/dbt/task/build.py::BuildTask.RUNNER_MAP`; `core/dbt/task/test.py::TestRunner.execute_data_test`, `build_test_run_result`; `core/dbt/artifacts/resources/v1/generic_test.py::GenericTest`; `core/dbt/artifacts/schemas/run/v5/run.py::process_run_result`; `schemas/dbt/run-results/v6.json` | `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/tests/generic/builtin.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/generic_test_sql/not_null.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/generic_test_sql/unique.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/tests/test.sql`; `crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/tests/helpers.sql`; `crates/dbt-schemas/src/schemas/run_results.rs::ContextRunResult`; `crates/dbt-tasks-core/src/test_aggregation.rs` | `src/project/duckdb.zig` owns the first direct DuckDB rendering/execution for `not_null` and `unique` column generic tests; `src/project.zig` owns the test-only `build` branch until a runner module exists; `src/project/run_results.zig` owns `pass`/`fail` generic-test result serialization; future work must add mixed build DAG scheduling, macro-backed test execution, wider generic/singular/unit/source tests, configs, and store-failures semantics |
58
59
| Fusion-style scalable artifacts | v1 JSON artifacts remain the base compatibility contract | README v2 notes JSON compatibility plus Parquet artifacts; `crates/dbt-index-core/src/ingest/ingest_state.rs`, `crates/dbt-index-core/src/db.rs` define metadata parquet directories and DuckDB views under `dbt.*` and `dbt_rt.*`| Future parse cache/state store, not M1 product behavior |
59
60
| Semantic layer and metrics |`schema_yaml_readers.py::MetricParser`, `SemanticModelParser`, `SavedQueryParser`; `manifest.py::process_metrics`, semantic manifest validation and writer |`crates/dbt-schemas/src/schemas/semantic_layer/*`, `crates/dbt-schemas/src/schemas/manifest/semantic_model.rs`, `crates/dbt-parser/src/resolve/resolve_semantic_models.rs`, `crates/dbt-parser/src/resolve/validate_semantic_models.rs`, `crates/dbt-metricflow/*`| Future `src/project/semantic.zig`, semantic manifest writer, metric planner; M1 should keep empty maps schema-valid until implemented |
60
61
@@ -64,13 +65,15 @@ Every compatibility slice should record:
64
65
- Current implemented command surface is `parse`, `ls`, `compile`, `docs
65
66
generate`, `run`, `build`, `version`, and help. `compile` and `docs generate`
66
67
are render-only artifact boundaries for the supported parser graph. `run`
67
-
now executes selected enabled DuckDB SQL models with `table` and `view`
68
+
executes selected enabled DuckDB SQL models with `table` and `view`
68
69
materializations through a Zig-owned external CLI backend, validates
69
70
supported materializations before opening DuckDB, executes selected models in
70
71
dependency order, writes `manifest.json`, compiled SQL, and a minimal v6
71
-
`run_results.json`. `build` remains a truthful preflight boundary that parses,
72
-
selects, compiles, writes artifacts, and then fails before seed/model/test
73
-
execution.
72
+
`run_results.json`. `build` executes root-project CSV seed-only selections and
73
+
test-only selected DuckDB column `not_null`/`unique` generic tests against
project `dispatch:` validation, `get_macro_search_order`, and
@@ -743,7 +755,7 @@ Exit criteria:
743
755
-`dxt compile` has started as a render-only M2 boundary for the current graph subset. It loads and resolves the same Zig parser graph, applies `--select` and `--exclude`, compiles selected enabled SQL model nodes, writes compiled SQL under `target/compiled/<package>/...`, and emits `compiled`, `compiled_code`, `compiled_path`, `relation_name`, `extra_ctes`, and `extra_ctes_injected` only for compiled model nodes. The current compiler renders `config` to empty text, literal or narrow scalar var-backed `ref`/`source` calls to deterministic quoted relation names, profile-derived `target.*`, current-model `this`, and quoted literal inline `config(schema=..., alias=...)` as default dbt relation schema/identifier components without opening a database connection.
744
756
-`dxt docs generate` has started as an adapter-free docs artifact boundary. It loads and resolves the same Zig parser graph, applies `--select` and `--exclude` to compiled model output, writes compiled SQL, writes `manifest.json`, and writes an empty dbt-shaped `catalog.json` because adapter relation introspection is not implemented yet. Macro execution, materializations, tests, profiles-derived relation identity, adapters, `run_results.json`, non-empty `catalog.json`, and `docs serve` remain out of scope.
745
757
- `dxt run` has started the M3 DuckDB execution path for selected enabled SQL models. It loads and resolves the same Zig parser graph, applies supported selectors/excludes, compiles selected SQL models, validates that selected models use only `table` or `view` materializations before opening DuckDB, executes selected models in dependency order through a Zig-owned external DuckDB CLI backend, writes compiled SQL, writes `manifest.json`, and writes a minimal dbt-shaped success-only `run_results.json` v6 slice after completed runs. It supports default `target/dxt.duckdb` output plus scalar DuckDB profile `path` resolved relative to the loaded `profiles.yml` directory as a deterministic dxt-local path-base choice for this first CLI-backed slice. It does not execute seeds, tests, snapshots, incremental, ephemeral, hooks, grants, docs persistence, catalog introspection, failure/partial run-results artifacts, relation staging/backup rename parity, threaded scheduling, `:memory:`, MotherDuck, or embedded `libduckdb`.
746
-
-`dxt build`remains a truthful execution preflight boundary. It loads and resolves the same Zig parser graph, applies supported selectors/excludes, compiles selected SQL models where applicable, writes `manifest.json`, and then fails before seed/model/test execution with explicit runner boundary errors.
758
+
-`dxt build`has started the M3 DuckDB execution path for root-project CSV seed-only selections and test-only selected DuckDB column-level `not_null`/`unique` generic tests. It loads and resolves the same Zig parser graph, applies supported selectors/excludes, writes `manifest.json`, loads seeds through the Zig-owned DuckDB CLI backend, executes supported generic tests against already-existing attached relations, writes a minimal dbt-shaped `run_results.json` v6 slice, and returns exit code `1` when any selected generic test fails. Model-build execution, mixed seed/model/test DAG scheduling, package seeds, seed configs, wider generic tests, singular tests, unit tests, source tests, custom test configs, hooks, grants, docs persistence, full-refresh semantics, `store_failures`, and adapter materialization macro execution remain explicit boundaries.
747
759
- Synthetic fixtures cover one model, model refs, seed refs, source refs, narrow scalar var-backed model/source refs with CLI overrides and positional string defaults, exposure refs to models and sources, combined source/model YAML, inline config/tag selection, config materialization selection, comma-intersection selection, YAML model properties and columns, emitted `unique`, `not_null`, `accepted_values`, and `relationships` generic test nodes, project macro artifacts, macro block variants, macro materialization `supported_languages`, and macro properties including patched `docs` and `meta`, configured `macro-paths` replacing the default macro directory, installed package macros with package-qualified calls and package-local macro calls, installed package models, seeds, sources, docs, exposures, package YAML model properties, root package config overrides, and package-qualified/package-local refs/sources, macro calls recorded in model and macro `depends_on.macros`, docs blocks with literal `doc` descriptions, disabled models, disabled ref diagnostics, unmatched model-property warnings, duplicate model and docs diagnostics, unsupported dynamic doc diagnostics, unresolved var diagnostics for var-backed refs without scalar/default values, missing doc diagnostics, malformed docs block diagnostics, unresolved package macro diagnostics, and unsupported unknown macro-call diagnostics.
748
760
- The committed M1 public Jaffle gate lives in `scripts/check_jaffle_shop_duckdb_parse.py`. It clones a pinned public Jaffle Shop DuckDB ref into a temporary directory by default, runs the Zig `dxt` binary, validates the current M1 manifest schema slice, asserts the supported partial manifest shape with five SQL models, three CSV seeds, two docs blocks, twenty supported generic test nodes, model/test `refs` artifact fields, dependency maps, materialization/docs config, and checks representative `dxt ls` selector behavior for resource types, materialization config, wildcards, path selectors, and graph expansion. It is a developer-side Python compatibility harness only; product parse/list behavior remains implemented in Zig. Remaining M1 work includes package-provided generic tests/macros beyond the current narrow macro call surface and deeper Jaffle artifact parity.
749
761
- Selector wildcard behavior is currently pinned to observed dbt Core 1.10 behavior. dbt Fusion preview currently differs for resource-type-prefixed wildcard selectors such as `model.<package>.*` and filename-suffix path selectors such as `path:*orders.sql`; a future Fusion-compatibility slice must decide whether to support a selector dialect switch or a compatible superset.
0 commit comments