Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions recce/adapter/dbt_adapter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,12 +621,15 @@ def execute(

def build_parent_map(self, nodes: Dict, base: Optional[bool] = False) -> Dict[str, List[str]]:
manifest = self.curr_manifest if base is False else self.base_manifest
manifest_dict = manifest.to_dict()

try:
parent_map_source = manifest.parent_map
except AttributeError:
parent_map_source = manifest.to_dict()["parent_map"]

node_ids = nodes.keys()
parent_map = {}
for k, parents in manifest_dict["parent_map"].items():
if k not in node_ids:
for k, parents in parent_map_source.items():
if k not in nodes:
continue
parent_map[k] = [parent for parent in parents if parent in node_ids]

Expand Down
Loading