Empowering Data Teams: Smarter AI WorkflowsLive demo with Hex + MotherDuck on Nov 13

Skip to main content

DataGrip

JetBrains DataGrip is a cross-platform IDE for working with SQL and noSQL databases. It includes a DuckDB integration, which makes connecting to MotherDuck easy.

Connecting to MotherDuck in DataGrip

Create a new data source and choose the DuckDB driver. DataGrip opens the Data Sources and Drivers window where you configure the connection.

Token Authentication

To retrieve a MotherDuck token, follow the steps in Authenticating to MotherDuck.

  1. In Data Sources and Drivers > General, set Authentication to No auth.
  2. Populate the URL field with the MotherDuck connection string, replacing my_db with your database name or omitting it to connect to the default catalog:
jdbc:duckdb:md:[my_db]

config

  1. Open the Advanced tab and add a new parameter named motherduck_token, setting its value to the token you generated earlier.

config

Click "OK" to begin querying MotherDuck!

note

The default schema filtering configuration of DataGrip may hide some of the schemas that exist in your MotherDuck account. Reconfigure to display all schemas following DataGrip documentation.

Update the DuckDB Driver Version

DataGrip bundles a DuckDB JDBC driver, but you can replace it with another version if needed.

  1. Visit the DuckDB JDBC maven repository.
  2. Select the DuckDB release you want to use and download the .jar file listed under Files.
  3. In the Data Sources and Drivers window, switch to the Drivers pane and select DuckDB.
  4. On the General tab, find Driver files, click the + icon, and choose the .jar file you downloaded.
  5. You need to remove the existing DuckDB driver from the Drivers pane for the new driver to take effect (needs to be first in the list).
  6. [optional] To restore the default driver, click on the + icon and select DuckDB among the available drivers.

DataGrip now uses the updated DuckDB driver for MotherDuck connections.