Repository navigation
feat: shorter CLI forms for selection, global flags, JSON output, scope targets and cursors - #980
Merged
Merged
Conversation
…pe targets and cursors Accept --project-dir, --no-color and --debug after the subcommand as well as before it. Treat positional arguments to compile, plan, build, test, seed, freshness, audit and check as selectors, combined with any --select values. Add --json as shorthand for --format json on lineage and query. Let sqb scope take bare model, source, seed and function names, resolved with the shared target resolver; macros, enums, constants, tests and audits keep their prefix and fail with C960 when written bare. Add --start-cursor and --end-cursor to build, plan and load, typed from the selected models' cursor type; a selection mixing timestamp and integer cursors fails with S303. The -ts and -int flags keep working.
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 free
to 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.
Why
Several CLI forms needed typing the tool could work out: global flags only worked before the subcommand, selection needed
--select,lineageandquerylacked--json,sqb scoperequired kind prefixes even for unique names, and cursor overrides needed type-specific flags.Changes
--project-dir,--no-colorand--debugwork before or after the subcommand (undersqb dbt,--project-dirstill goes beforedbt).compile,plan,build,test,seed,freshness,auditandchecktake selectors as positional arguments, combined with--select.--jsononlineageandquery(shorthand for--format json).sqb scopeaccepts bare model, source, seed and function names; declaration kinds that can share names keep their prefix, with C960 showing the prefixed form.--start-cursor/--end-cursoronbuild,planandload, typed from the selected models; mixed cursor types fail with S303. The-ts/-intflags still work.Verification
fensu checkandmake check-ci.--select.