Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-1204] [Feature] Add shorthand for --full-refresh flag #5878

Closed
3 tasks done
dave-connors-3 opened this issue Sep 19, 2022 · 10 comments · Fixed by #5879 or #5908
Closed
3 tasks done

[CT-1204] [Feature] Add shorthand for --full-refresh flag #5878

dave-connors-3 opened this issue Sep 19, 2022 · 10 comments · Fixed by #5879 or #5908
Assignees
Labels
cli enhancement New feature or request help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors

Comments

@dave-connors-3
Copy link
Contributor

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I write (and misspell!) --full-refresh a whole heck of a lot during dbt development. Would love to add a shorthand for that flag in the sameway that --select can be reduced to -s, --target can be reduced to -t etc.

Describe alternatives you've considered

Keeping on keeping on! There's a tradeoff here between clarity and brevity, so i understand we probably don't want to make every single flag shorthand!

Who will this benefit?

keyboard users

Are you interested in contributing this feature?

Yes!

Anything else?

No response

@dave-connors-3 dave-connors-3 added enhancement New feature or request triage labels Sep 19, 2022
@github-actions github-actions bot changed the title [Feature] Add shorthand for --full-refresh flag [CT-1204] [Feature] Add shorthand for --full-refresh flag Sep 19, 2022
@lostmygithubaccount
Copy link
Contributor

I like it...perhaps we can tackle in the click work for 1.4? @iknox-fa how easy would this be? should we wait, or do this now?

@b-per
Copy link
Contributor

b-per commented Sep 22, 2022

I thought that shorthand params needed to be 1 char so we could chain them together, e.g. dbt -x -q run is the same as doing dbt -xq run(and it is the same behavior for most CLI tools, like ls -la being the same as ls -l -a).

Did we check what happens now that we have a shorthand param with 2 chars?

@jtcohen6
Copy link
Contributor

@b-per Whoa, I didn't know about that! It isn't something I checked (or thought about) when we were deciding between -fr and a single-character version (-f).

Links I quickly found:

Each option name should be a single alphanumeric character (the alnum character classification) from the portable character set.

If there's a lot of additional utility in doing this, we could swap to the single char version (-f)

@dave-connors-3
Copy link
Contributor Author

whoa who knew! Definitely open to changing it! I have never chained flags together as i'm sure you can tell

@b-per
Copy link
Contributor

b-per commented Sep 22, 2022

This is another link mentioning that from the POSIX standpoint short params should be 1 char. Not sure if we are forcing ourselves to be POSIX compliant though.

I thing that -f is a pretty good candidate instead of -fr.

@dave-connors-3
Copy link
Contributor Author

Despite my love for the very memeable -fr, I am convinced

@jtcohen6
Copy link
Contributor

may the -f be with you both!

wanna PR it up? (and edit the description here: dbt-labs/docs.getdbt.com#2055)?

@dave-connors-3
Copy link
Contributor Author

on it!

@dave-connors-3 dave-connors-3 mentioned this issue Sep 22, 2022
5 tasks
@dave-connors-3
Copy link
Contributor Author

@b-per -- out of curiousity, if i was going to chain flags together that require arguments (like -t or -s, so the args just follow the order of the flags as you combine them?

i.e.

$ dbt build -s i_miss_fr -t postgres
$ dbt build -st i_miss_fr postgres

are the same?

@leahwicz leahwicz added the help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors label Sep 22, 2022
@b-per
Copy link
Contributor

b-per commented Sep 22, 2022

I believe that chaining short parameters is only supported for those that don't require any value. So build -xf works but to add a selector it will be build -xf -s my_model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement New feature or request help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors
Projects
None yet
5 participants