Skip to content

Commit

Permalink
Add fnMatch to group selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
heysweet committed Mar 24, 2024
1 parent c071868 commit 7382971
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/dbt/graph/selector_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class GroupSelectorMethod(SelectorMethod):
def search(self, included_nodes: Set[UniqueId], selector: str) -> Iterator[UniqueId]:
"""yields nodes from included in the specified group"""
for node, real_node in self.groupable_nodes(included_nodes):
if selector == real_node.config.get("group"):
if fnmatch(selector, real_node.config.get("group")):
yield node


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_graph_selector_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ def test_select_group(manifest, view_model):
assert method.arguments == []

assert search_manifest_using_method(manifest, method, group_name) == {"view_model"}
assert search_manifest_using_method(manifest, method, "my?group") == {"view_model"}
assert not search_manifest_using_method(manifest, method, "not_my_group")


Expand Down

0 comments on commit 7382971

Please sign in to comment.