File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import pandas as pd
88from 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_
1111from sqlmesh .core .engine_adapter import EngineAdapter
1212from sqlmesh .core .snapshot import DeployabilityIndex , Snapshot , to_table_mapping
1313from 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 )
You can’t perform that action at this time.
0 commit comments