Skip to content

Commit

Permalink
Add supported MotherDuck connection string parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnWoelm committed Jan 16, 2025
1 parent 6e96ccc commit f1645f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions duckdb_engine/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@

@lru_cache()
def get_core_config() -> Set[str]:
# List of connection string parameters that are supported by MotherDuck
# See: https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/
motherduck_config_keys = {"motherduck_token", "attach_mode", "saas_mode"}

rows = (
duckdb.connect(":memory:")
.execute("SELECT name FROM duckdb_settings()")
.fetchall()
)
# special case for motherduck here - they accept this config at extension load time
return {name for (name,) in rows} | {"motherduck_token"}
return {name for (name,) in rows} | motherduck_config_keys


def apply_config(
Expand Down

0 comments on commit f1645f8

Please sign in to comment.