Skip to content

Commit 381e55a

Browse files
committed
fix: gather engine_adapters from all projects
1 parent 4fa9992 commit 381e55a

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

sqlmesh/core/context.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,13 +2649,16 @@ def cache_dir(self) -> Path:
26492649

26502650
@cached_property
26512651
def engine_adapters(self) -> t.Dict[str, EngineAdapter]:
2652-
"""Returns all the engine adapters for the gateways defined in the configuration."""
2652+
"""Returns all the engine adapters for the gateways defined in the configurations."""
26532653
adapters: t.Dict[str, EngineAdapter] = {self.selected_gateway: self.engine_adapter}
2654-
for gateway_name in self.config.gateways:
2655-
if gateway_name != self.selected_gateway:
2656-
connection = self.config.get_connection(gateway_name)
2657-
adapter = connection.create_engine_adapter(concurrent_tasks=self.concurrent_tasks)
2658-
adapters[gateway_name] = adapter
2654+
for config in self.configs.values():
2655+
for gateway_name in config.gateways:
2656+
if gateway_name not in adapters:
2657+
connection = config.get_connection(gateway_name)
2658+
adapter = connection.create_engine_adapter(
2659+
concurrent_tasks=self.concurrent_tasks,
2660+
)
2661+
adapters[gateway_name] = adapter
26592662
return adapters
26602663

26612664
@cached_property

0 commit comments

Comments
 (0)