Skip to content

Commit 41215a0

Browse files
committed
address comments
1 parent 708a315 commit 41215a0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sqlmesh/dbt/adapter.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pandas as pd
88
from sqlglot import exp, parse_one
99

10-
from sqlmesh.core.dialect import normalize_and_quote, normalize_model_name
10+
from sqlmesh.core.dialect import normalize_and_quote, normalize_model_name, schema_
1111
from sqlmesh.core.engine_adapter import EngineAdapter
1212
from sqlmesh.core.snapshot import DeployabilityIndex, Snapshot, to_table_mapping
1313
from sqlmesh.utils.errors import ConfigError, ParsetimeAdapterCallError
@@ -259,11 +259,7 @@ def load_relation(self, relation: BaseRelation) -> t.Optional[BaseRelation]:
259259
return self._table_to_relation(mapped_table)
260260

261261
def list_relations(self, database: t.Optional[str], schema: str) -> t.List[BaseRelation]:
262-
target_schema = exp.Table(
263-
this=None,
264-
db=exp.to_identifier(schema),
265-
catalog=exp.to_identifier(database) if database else None,
266-
)
262+
target_schema = schema_(schema, catalog=database)
267263
# Normalize before converting to a relation; otherwise, it will be too late,
268264
# as quotes will have already been applied.
269265
target_schema = self._normalize(target_schema)

0 commit comments

Comments
 (0)