Skip to content

Commit

Permalink
allow seeds/sources
Browse files Browse the repository at this point in the history
  • Loading branch information
adammarples committed Dec 14, 2023
1 parent f83c4bf commit 213620f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cosmos/dbt/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,10 @@ def _should_include_node(self, node_id: str, node: DbtNode) -> bool:
self.visited_nodes.add(node_id)

if node.resource_type == DbtResourceType.TEST:
dependency_ids = [node_id for node_id in node.depends_on if node_id.startswith("model.")]
parent_id = dependency_ids[-1]
if len(dependency_ids) > 1:
parent_id = node.depends_on[-1]
if len(node.depends_on) > 1:
logger.warning(
f"Test node {node.name} has more than one model dependency {dependency_ids}, selected tags from parent assumed to be {parent_id}."
f"Test node {node.name} has more than one model dependency {node.depends_on}, selected tags from parent assumed to be {parent_id}."
)
parent_tags = getattr(self.nodes.get(parent_id), "tags", [])
node.tags = list(set(node.tags + parent_tags))
Expand Down

0 comments on commit 213620f

Please sign in to comment.