Skip to content

Commit 338f642

Browse files
committed
fix: gather engine_adapters from all projects
1 parent 9b26320 commit 338f642

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

sqlmesh/core/context.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,13 +2649,14 @@ 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+
adapters[gateway_name] = adapter
26592660
return adapters
26602661

26612662
@cached_property

0 commit comments

Comments
 (0)