diff --git a/core/dbt/context/providers.py b/core/dbt/context/providers.py index c6ffe4e35b8..0863b465b53 100644 --- a/core/dbt/context/providers.py +++ b/core/dbt/context/providers.py @@ -870,6 +870,9 @@ def load_agate_table(self) -> agate.Table: else "." ) path = os.path.join(self.config.project_root, package_path, self.model.original_file_path) + if not os.path.exists(path): + assert self.model.root_path + path = os.path.join(self.model.root_path, self.model.original_file_path) column_types = self.model.config.column_types delimiter = self.model.config.delimiter diff --git a/core/dbt/contracts/graph/nodes.py b/core/dbt/contracts/graph/nodes.py index 830237f8fd6..065a60a6d33 100644 --- a/core/dbt/contracts/graph/nodes.py +++ b/core/dbt/contracts/graph/nodes.py @@ -875,7 +875,6 @@ class SeedNode(ParsedNode): # No SQLDefaults! config: SeedConfig = field(default_factory=SeedConfig) # seeds need the root_path because the contents are not loaded initially # and we need the root_path to load the seed later - # TODO: remove root_path as it is unused, and instead computed dynamically in load_agate_table root_path: Optional[str] = None depends_on: MacroDependsOn = field(default_factory=MacroDependsOn) defer_relation: Optional[DeferRelation] = None