From 1fa36089f40fab4fe7961aeccfe43696d6995fd9 Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Sun, 7 May 2023 13:25:59 -0400 Subject: [PATCH] manifest.resolve_ref with package in patch parser --- core/dbt/parser/schemas.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/dbt/parser/schemas.py b/core/dbt/parser/schemas.py index 333f82f156e..727824f323e 100644 --- a/core/dbt/parser/schemas.py +++ b/core/dbt/parser/schemas.py @@ -918,7 +918,10 @@ def parse_patch(self, block: TargetBlock[NodeTarget], refs: ParserRef) -> None: assert isinstance(self.yaml.file, SchemaSourceFile) source_file: SchemaSourceFile = self.yaml.file if patch.yaml_key in ["models", "seeds", "snapshots"]: - unique_id = self.manifest.ref_lookup.get_unique_id(patch.name, None, None) + unique_id = self.manifest.ref_lookup.get_unique_id( + patch.name, self.project.project_name, None + ) or self.manifest.ref_lookup.get_unique_id(patch.name, None, None) + if unique_id: resource_type = NodeType(unique_id.split(".")[0]) if resource_type.pluralize() != patch.yaml_key: