When passing a token via the config, this didn't work because there is a typo (by yours truly 😬) here.
The PR also addresses how a user can pass the MotherDuck token to duckdb.connect:
Adds a motherduck_token property to DuckDBCredentials that fetches it from the plugin config.
The user can specify the token in the path (e.g. "md:?motherduck_token=<token>". This will override a motherduck_token environment variable if it exists.
We no longer use an explicit SET command and instead pass a config dictionary to duckdb.connect. Any config options passed this way will override the corresponding environment variable as well as any options set in the path.
So the behavior is now the same as in duckdb: env var < path < config. (where left < right means "right overrides left").
This PR fixes a bug:
The PR also addresses how a user can pass the MotherDuck token to
duckdb.connect
:motherduck_token
property toDuckDBCredentials
that fetches it from the plugin config."md:?motherduck_token=<token>"
. This will override amotherduck_token
environment variable if it exists.SET
command and instead pass aconfig
dictionary toduckdb.connect
. Any config options passed this way will override the corresponding environment variable as well as any options set in the path.So the behavior is now the same as in duckdb: env var < path < config. (where left < right means "right overrides left").