Skip to content

Conversation

@UgoM
Copy link

@UgoM UgoM commented Jan 20, 2026

It is my first PR on your repo, so don’t hesitate to help me improve it if I’ve done things wrong.

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue

Fixes #10317

Description

external_driver_factory in Python (cube.py) fails because it expects a BaseDriver instance but Python can only return config dicts. This works fine for driver_factory which has conversion logic in resolveDriver(), but externalDriverFactory was missing the same treatment.

This PR adds the same config-to-driver conversion pattern used by driverFactory:

if (isDriver(val)) {
  driver = val;
} else if (val.type && typeof val.type === 'string') {
  const { type, ...rest } = val;
  driver = CubejsServerCore.createDriver(type, rest);
}

Now both factories behave consistently and Python users can use external_driver_factory with config dicts.

@UgoM UgoM requested a review from a team as a code owner January 20, 2026 12:22
@github-actions github-actions bot added javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members. labels Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

external_driver_factory is unusable in Python (cube.py)

1 participant