Open matheusb-comp opened 6 days ago
Hi @matheusb-comp 👋
Thanks for posting! It looks like the error message has pointed you in the right direction and you were able to configure what you want. What is the question here?
Well, from the from typescript I understood that driver_factory
could return class instances and config objects.
However, from the tests it seems it can only return one or the other, not both formats.
So the question is basically if this is the intended behaviour.
And if so, I'm not sure if CubejsServerCore.createDriver
is the correct way to create the non-custom driver instances (to be equivalent to the other format, returning the config objects).
Problem
From the
driver_factory
documentation, when using JavaScript, there are examples for returning a driver config object ({ type: "duckdb" }
) and an instance of a Custom Driver (class that extendsBaseDriver
).However, I'm getting an error with the option configured to return both formats:
From the TypeScript definition this should be OK, but this is the error that happens during schema compilation:
If instead I return a driver instance, no error is shown: