Skip to content

Enable saas_mode parameter when connecting to motherduck #1321

@pietro-fantini

Description

@pietro-fantini

Describe the use case

I want to connect to a motherduck db, but I don't want that motherduck interacts with my client. They enable this by putting the saas_mode=true parameter in the connection uri. From their documentation:

conn = duckdb.connect("md:[<database_name>]?[motherduck_token=<motherduck_token>]&saas_mode=true")

Example Use

Currently sqlalchemy doesn't support to pass this parameter. When I try to create the engine with:

sqlalchemy.create_engine(url="duckdb:///md:<database>?motherduck_token=<token>&saas_mode=true")

It raises the error:

ProgrammingError: (duckdb.duckdb.InvalidInputException) Invalid Input Error: The following options were not recognized: saas_mode
(Background on this error at: https://sqlalche.me/e/20/f405)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions