Skip to content

Commit a340311

Browse files
committed
temp
1 parent 035403d commit a340311

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

sqlmesh/core/context.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -943,11 +943,8 @@ def config_for_path(self, path: Path) -> t.Tuple[Config, Path]:
943943
def config_for_node(self, node: str | Model | Audit) -> Config:
944944
if isinstance(node, str):
945945
path = self.get_snapshot(node, raise_if_missing=True).node._path
946-
if path is None:
947-
return self.config
948-
config = self.config_for_path(path)
949-
return config[0]
950-
path = node._path
946+
else:
947+
path = node._path
951948
if path is None:
952949
return self.config
953950
return self.config_for_path(path)[0] # type: ignore

sqlmesh/dbt/converter/convert.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,13 @@ def _convert_models(
222222
model.kind.path = str(Path("../seeds", seed_filename))
223223
else:
224224
if model._path is None:
225-
raise ValueError(f"Unhandled model path: {model._path}")
225+
raise ValueError(f"Unhandled model path for model {model_name}")
226226
if input_paths.models in model._path.parents:
227227
model_filename = model._path.relative_to(input_paths.models)
228228
elif input_paths.snapshots in model._path.parents:
229229
# /base/path/snapshots/foo.sql -> /output/path/models/dbt_snapshots/foo.sql
230230
model_filename = "dbt_snapshots" / model._path.relative_to(input_paths.snapshots)
231-
elif input_paths.tests in model._path.parents:
232-
# /base/path/tests/foo.sql -> /output/path/audits/foo.sql
233-
model_filename = "dbt_tests" / model._path.relative_to(input_paths.tests)
234231
elif input_paths.packages in model._path.parents:
235-
# /base/path/dbt_packages/foo/models/bar.sql -> /output/path/models/dbt_packages/foo/models/bar.sql
236232
model_filename = c.MIGRATED_DBT_PACKAGES / model._path.relative_to(
237233
input_paths.packages
238234
)

0 commit comments

Comments
 (0)