# Sling
> Data integration platform for connecting data sources to warehouses. It integrates with MotherDuck for loading data from operational systems, APIs, files, or event streams.
## How it works with MotherDuck

Sling connects to MotherDuck as a database connection that can be used in replication and pipeline workflows.

## Prerequisites

- Sling CLI or Sling Platform.
- A MotherDuck service token.
- The target MotherDuck database name.

## Setup

Configure the MotherDuck connection with the required `type`, `database`, and `motherduck_token` values:

```bash
sling conns set MOTHERDUCK type=motherduck database=my_db motherduck_token=<motherduck_token>
```

You can also use a connection URL:

```bash
sling conns set MOTHERDUCK url="motherduck://my_db?motherduck_token=<motherduck_token>"
```

For checked-in configuration, define the connection in Sling's environment file and load the token from your secret manager before running Sling.

## Authentication and configuration

- `database` and `motherduck_token` are required.
- `schema` sets the default schema.
- `read_only` can be used for workflows that should not write to MotherDuck.
- `motherduck_attach_mode` can be set to `workspace` or `single` when you need explicit attach behavior.

## Important notes

- Keep the MotherDuck token out of committed Sling configuration.
- Sling's MotherDuck docs list additional copy and DuckDB CLI options. Most MotherDuck workflows only need the database, token, and optional schema.
- A `.duckdbrc` file can interfere with Sling because Sling invokes DuckDB under the hood.

## Use cases

- Replicate data from files, APIs, and databases into MotherDuck.
- Use Sling CLI in scheduled jobs or CI workflows.
- Move data from MotherDuck to another supported destination when needed.

## Related content

- [View the full Sling MotherDuck setup guide](https://docs.slingdata.io/connections/database-connections/motherduck)
- [Loading data into MotherDuck](/key-tasks/loading-data-into-motherduck/)
- [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck)


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/integrations/ingestion/sling/",
  "page_title": "Sling",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
