Skip to main content

MotherDuck

Connect to MotherDuck, a DuckDB cloud data warehouse.

Prerequisites

Generate a MotherDuck API key

  1. Open the MotherDuck UI
  2. Click on your organization's name in the top left
  3. Navigate to Settings > Access Tokens
  4. Click + Create Token
  5. Give your token a descriptive name like ascend_default_data_plane
  6. Ensure the token type is set to Read/Write Token
  7. (Optional) Set an expiration date for your token if desired
  8. Click Create token
  9. Copy your token immediately to use in the next step

Store your MotherDuck API key

Store your MotherDuck API key as an Environment Vault secret to securely configure your MotherDuck Data Plane:

  1. In your Ascend Instance, click on your profile picture in the top-right corner and select Settings
  2. Navigate to the Secrets & Vaults section
  3. Select the Default Environment Vault if you're using a trial Instance or another Environment if desired
  4. Click Add secret
  5. Name your secret MOTHERDUCK_API_KEY and paste the API key in the Value field
  6. Click Create to store your secret

Create a DuckDB Connection

From your Workspace Super Graph view, follow these steps:

  1. Create a Connection by either:
    • Clicking the + button next to Connections in the left Build panel
    • add-connection
    • Right-clicking in the Super Graph and selecting Create Connection
    • menu
  2. Select DuckDB from the available options
  3. Enter a descriptive name like data_plane_motherduck
  4. Fill in the required fields (and any optional fields as needed)
  5. Click Save at the bottom to create your Connection
  6. form

For complete configuration options, see our Connection reference guide.

note

If you're using the UI form, make sure to manually add the MotherDuck API key to your Data Plane Connection configuration as shown below.

Example

Use the following YAML template for your MotherDuck Connection. Customize the highlighted values with your specific Connection details:

/my_project/connections/connection-motherduck.yaml
connection:
duckdb:
max_concurrent_queries: ${parameters.duckdb.max_concurrent_queries:-32}
motherduck:
api_key: ${vaults.environment.MOTHERDUCK_API_KEY}

🎉 Congratulations, you just set up a MotherDuck Connection in Ascend!