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

[Feature] Add fnMatch (Wildcard support) to group selectors #9811

Closed
3 tasks done
heysweet opened this issue Mar 24, 2024 · 1 comment · Fixed by #9812
Closed
3 tasks done

[Feature] Add fnMatch (Wildcard support) to group selectors #9811

heysweet opened this issue Mar 24, 2024 · 1 comment · Fixed by #9812
Labels
enhancement New feature or request

Comments

@heysweet
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

Many selector methods support wildcard:

  • fqn
  • tag
  • source
  • exposure
  • metric
  • file
  • package
  • test

Group is similar to tags, and it's possible user may want to use characters like spaces in group names. If a group or tag has a space in it, it's impossible to use selector syntax to target it without fnMatch, where you can substitute the with a ?.

Describe alternatives you've considered

The alternatives of banning spaces outright in things like group names is much more prohibitive, and the alternative of adding support for spaces in sector values is a larger ask.

Who will this benefit?

Anybody using groups will be able to better target them. In Explorer, it'd be valuable to support groups with spaces via ? substitution, instead of filtering out groups which have spaces in them.

Are you interested in contributing this feature?

Yes

Anything else?

No response

@heysweet heysweet added enhancement New feature or request triage labels Mar 24, 2024
@dbeatty10
Copy link
Contributor

Makes sense @heysweet !

Absolutely buy the argument that you should be able to select by a certain group, even if it has a space in it.

Overall, it seems like wildcard selection can be useful whenever a selector method targets a string value that users can control (and in which they might have common prefixes or postfixes). The scenario in which it doesn’t seem to have value is when a selector method targets a field that doesn’t/can't have any groupings by prefix or postfix (e.g., a small enumeration that dbt controls).

So it makes sense to add to add wildcard selection to the "group" selector method like you did in #9812 to support spaces, but also because users can control the valid values 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants