DBeaver Community is a free cross-platform database integrated development environment (IDE). It includes a DuckDB integration, so it is a great choice for querying MotherDuck.
DBeaver DuckDB Setup
DBeaver uses the official DuckDB JDBC driver, which supports MotherDuck out of the box! To install DBeaver and the DuckDB driver, first follow the DuckDB DBeaver guide. That guide will create a local DuckDB in memory connection. After completing those steps, follow the steps below to add a MotherDuck connection in addition!
Connecting DBeaver to MotherDuck
Create a new DuckDB connection in DBeaver.
When entering the connection string in DBeaver, instead of using
:memory: for an in memory DuckDB, use
my_db with the name of the target MotherDuck database as needed.
Clicking either "Test Connection" or "Finish" will open the default browser and display an authorization prompt. Click "Confirm", then return to DBeaver to begin querying MotherDuck!
To avoid the authentication prompt when opening DBeaver, a MotherDuck service token can be included as a connection string parameter.
To retrieve a token, follow the steps in Authenticating to MotherDuck.
Then, create a new DuckDB connection in DBeaver.
Include the token as a query string parameter in the connection string following this format, replacing
<token> with the service token from the prior step, and
my_db with the target MotherDuck database:
Click "Finish" to begin querying MotherDuck!