diff --git a/core/dbt/graph/selector_methods.py b/core/dbt/graph/selector_methods.py index a9cc6eabbbb..87190c047bb 100644 --- a/core/dbt/graph/selector_methods.py +++ b/core/dbt/graph/selector_methods.py @@ -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 diff --git a/tests/unit/test_graph_selector_methods.py b/tests/unit/test_graph_selector_methods.py index ee2c2c4d968..52013fd409d 100644 --- a/tests/unit/test_graph_selector_methods.py +++ b/tests/unit/test_graph_selector_methods.py @@ -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")