@@ -321,7 +321,7 @@ def create(
321321
322322 def _get_data_objects (schema : exp .Table , gateway : t .Optional [str ] = None ) -> t .Set [str ]:
323323 logger .info ("Listing data objects in schema %s" , schema .sql ())
324- objs = self ._get_adapter (gateway ).get_data_objects (schema , tables_by_schema [schema ])
324+ objs = self .get_adapter (gateway ).get_data_objects (schema , tables_by_schema [schema ])
325325 return {obj .name for obj in objs }
326326
327327 with self .concurrent_context ():
@@ -409,7 +409,7 @@ def migrate(
409409 s ,
410410 snapshots ,
411411 allow_destructive_snapshots ,
412- self ._get_adapter (s .model_gateway ),
412+ self .get_adapter (s .model_gateway ),
413413 deployability_index ,
414414 ),
415415 self .ddl_concurrent_tasks ,
@@ -437,7 +437,7 @@ def cleanup(
437437 lambda s : self ._cleanup_snapshot (
438438 s ,
439439 snapshots_to_dev_table_only [s .snapshot_id ],
440- self ._get_adapter (
440+ self .get_adapter (
441441 snapshot_gateways .get (s .snapshot_id .name ) if snapshot_gateways else None
442442 ),
443443 on_complete ,
@@ -471,7 +471,7 @@ def audit(
471471 kwargs: Additional kwargs to pass to the renderer.
472472 """
473473 deployability_index = deployability_index or DeployabilityIndex .all_deployable ()
474- adapter = self ._get_adapter (snapshot .model_gateway )
474+ adapter = self .get_adapter (snapshot .model_gateway )
475475
476476 if not snapshot .version :
477477 raise ConfigError (
@@ -605,7 +605,7 @@ def _evaluate_snapshot(
605605 else snapshot .table_name (is_deployable = deployability_index .is_deployable (snapshot ))
606606 )
607607
608- adapter = self ._get_adapter (model .gateway )
608+ adapter = self .get_adapter (model .gateway )
609609 evaluation_strategy = _evaluation_strategy (snapshot , adapter )
610610
611611 # https://github.com/TobikoData/sqlmesh/issues/2609
@@ -764,7 +764,7 @@ def _create_snapshot(
764764
765765 deployability_index = deployability_index or DeployabilityIndex .all_deployable ()
766766
767- adapter = self ._get_adapter (snapshot .model .gateway )
767+ adapter = self .get_adapter (snapshot .model .gateway )
768768 create_render_kwargs : t .Dict [str , t .Any ] = dict (
769769 engine_adapter = adapter ,
770770 snapshots = parent_snapshots_by_name (snapshot , snapshots ),
@@ -994,7 +994,7 @@ def _wap_publish_snapshot(
994994 ) -> None :
995995 deployability_index = deployability_index or DeployabilityIndex .all_deployable ()
996996 table_name = snapshot .table_name (is_deployable = deployability_index .is_deployable (snapshot ))
997- adapter = self ._get_adapter (snapshot .model_gateway )
997+ adapter = self .get_adapter (snapshot .model_gateway )
998998 adapter .wap_publish (table_name , wap_id )
999999
10001000 def _audit (
@@ -1021,7 +1021,7 @@ def _audit(
10211021 blocking = audit_args .pop ("blocking" , None )
10221022 blocking = blocking == exp .true () if blocking else audit .blocking
10231023
1024- adapter = self ._get_adapter (snapshot .model_gateway )
1024+ adapter = self .get_adapter (snapshot .model_gateway )
10251025
10261026 kwargs = {
10271027 "start" : start ,
@@ -1068,10 +1068,10 @@ def _create_schemas(
10681068 for schema_name , catalog in unique_schemas :
10691069 schema = schema_ (schema_name , catalog )
10701070 logger .info ("Creating schema '%s'" , schema )
1071- adapter = self ._get_adapter (gateways .get (schema )) if gateways else self .adapter
1071+ adapter = self .get_adapter (gateways .get (schema )) if gateways else self .adapter
10721072 adapter .create_schema (schema )
10731073
1074- def _get_adapter (self , gateway : t .Optional [str ] = None ) -> EngineAdapter :
1074+ def get_adapter (self , gateway : t .Optional [str ] = None ) -> EngineAdapter :
10751075 """Returns the adapter for the specified gateway or the default adapter if none is provided."""
10761076 if gateway :
10771077 if adapter := self .adapters .get (gateway ):
@@ -1089,7 +1089,7 @@ def _execute_create(
10891089 rendered_physical_properties : t .Dict [str , exp .Expression ],
10901090 dry_run : bool ,
10911091 ) -> None :
1092- adapter = self ._get_adapter (snapshot .model .gateway )
1092+ adapter = self .get_adapter (snapshot .model .gateway )
10931093 evaluation_strategy = _evaluation_strategy (snapshot , adapter )
10941094
10951095 # It can still be useful for some strategies to know if the snapshot was actually deployable
0 commit comments