Uh oh!
There was an error while loading. Please reload this page.
feat(cli): node selection for dataform compile - #27
Closed
ihistand wants to merge 1 commit into
Closed
Conversation
…tions) `dataform compile` now accepts the same selection flags as `run`/`build` (--actions, --tags, --include-deps, --include-dependents) and prunes the compiled graph before printing, mirroring dbt's `compile --select`. The whole project still compiles (ref() resolution needs every action registered); this only filters the printed output. A clean graph is pruned when a selector is present; on compile errors the full graph + errors print unchanged. A selector matching nothing emits an empty graph and exits 0, matching prune's run-side behavior. Reuses the existing prune() and the shared yargs option definitions -- no proto changes. Adds a `compile node selection` test suite over an upstream->midstream->downstream project covering each flag, empty matches, and the "--include-deps without a selector is rejected" validation. Resolves #2203
ihistand
commented
Jun 16, 2026
CollaboratorAuthor
Closing — the feature ships in SQLAnvil via #26 (merged to main). Keeping the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds node selection to
dataform compile, mirroringdbt compile --select.compilenow accepts the same selection flags asrun/build—--actions,--tags,--include-deps,--include-dependents— and filters the printed graph to just the selected action(s):This targets the
dataformbranch (a clean mirror ofdataform-co/dataform@main) so it can be contributed upstream for dataform-co/dataform#2203.How it works
This is output filtering, not partial compilation. The whole project must still compile (
ref()resolution and the dependency graph require every action registered), so we compile fully and then prune the result before printing — reusing the existing, battle-testedprune()thatrun/buildalready use, plus the shared yargs option definitions. No proto changes.prune's run-side behavior.--include-deps/--include-dependentsretain their existing validation (only valid alongside--actions/--tags).Tests
New
compile node selectionsuite incli/index_compile_test.tsover anupstream -> midstream -> downstreamproject, covering: full graph (no selector),--actions,--include-deps,--include-dependents,--tags, empty-match exits 0, and the no-selector validation error.//cli:index_compile_testpasses (full suite + new tests).Resolves #2203