Sling
Slingdata.ioBlogGithubHelp!
  • Introduction
  • Sling CLI
    • Installation
    • Environment
    • Running Sling
    • Global Variables
    • CLI Pro
  • Sling Platform
    • Sling Platform
      • Architecture
      • Agents
      • Connections
      • Editor
      • API
      • Deploy from CLI
  • Concepts
    • Replications
      • Structure
      • Modes
      • Source Options
      • Target Options
      • Columns
      • Transforms
      • Runtime Variables
      • Tags & Wildcards
    • Hooks / Steps
      • Check
      • Command
      • Copy
      • Delete
      • Group
      • Http
      • Inspect
      • List
      • Log
      • Query
      • Replication
      • Store
      • Read
      • Write
    • Pipelines
    • Data Quality
      • Constraints
  • Examples
    • File to Database
      • Custom SQL
      • Incremental
    • Database to Database
      • Custom SQL
      • Incremental
      • Backfill
    • Database to File
      • Incremental
    • Sling + Python 🚀
  • Connections
    • Database Connections
      • Athena
      • BigTable
      • BigQuery
      • Cloudflare D1
      • Clickhouse
      • DuckDB
      • DuckLake
      • MotherDuck
      • MariaDB
      • MongoDB
      • Elasticsearch
      • MySQL
      • Oracle
      • Postgres
      • Prometheus
      • Proton
      • Redshift
      • StarRocks
      • SQLite
      • SQL Server
      • Snowflake
      • Trino
    • Storage Connections
      • AWS S3
      • Azure Storage
      • Backblaze B2
      • Cloudflare R2
      • DigitalOcean Spaces
      • FTP
      • Google Drive
      • Google Storage
      • Local Storage
      • Min.IO
      • SFTP
      • Wasabi
Powered by GitBook
On this page
  • Setup
  • Using sling conns
  • Environment Variable
  • Sling Env File YAML
  • Specifying a DuckDB version
  • Potential Issue
  1. Connections
  2. Database Connections

MotherDuck

Connect & Ingest data from / to a MotherDuck database

PreviousDuckLakeNextMariaDB

Last updated 1 month ago

Setup

The following credentials keys are accepted:

  • database (required) -> The motherduck database name

  • motherduck_token (required) -> The service token. See for instructions on getting it.

  • schema (optional) -> The default schema to use.

  • duckdb_version (optional) -> The CLI version of DuckDB to use. You can also specify the env. variable DUCKDB_VERSION.

  • read_only (optional) -> Whether to open the connection in readonly mode. Accepts true or false. Default is false.

  • interactive (optional) -> Whether to communicate to the DuckDB CLI via interactive mode instead of reopening the connection each time. Accepts true or false. Default is true.

Using sling conns

Here are examples of setting a connection named MOTHERDUCK. We must provide the type=motherduck property:

$ sling conns set MOTHERDUCK type=motherduck database=my_db motherduck_token=xxxxxxxxxxxx

# Or use url
$ sling conns set MOTHERDUCK url="motherduck://my_db?motherduck_token=xxxxxxxxxxxx"

Environment Variable

export MOTHERDUCK='motherduck://my_db?motherduck_token=xxxxxxxxxxxx'
export MOTHERDUCK='{ type: motherduck, database: "my_db", motherduck_token: "xxxxxxxxxxxx" }'

Sling Env File YAML

connections:
  MOTHERDUCK:
    type: motherduck
    database: <database>
    motherduck_token: <motherduck_token>
    schema: <schema>
    duckdb_version: '<duckdb_version>'

Specifying a DuckDB version

If you would like to use a specific DuckDB version, you can specify this way:

export DUCKDB_VERSION='0.7.0'

Potential Issue

If you have a .duckdbrc file, which runs commands whenever the DuckDB CLI is invoked, this may interfere with normal Sling operation. If you are facing weird issues and have this file, try again after deleting it.

See to learn more about the sling env.yaml file.

If you are facing issues connecting, please reach out to us at , on or open a Github Issue .

here
here
support@slingdata.io
discord
here