> ## Documentation Index
> Fetch the complete documentation index at: https://artie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MotherDuck

> Configure MotherDuck as a destination in Artie. Learn how to create access tokens, set up your pipeline database, and share data across your organization.

## Required settings

* MotherDuck access token (Read/Write)
* Database name

<Note>
  We recommend creating a dedicated MotherDuck account for pipeline writes (either a service account or a regular account like `cdc-writer@company.com`). Data written by this account will only be accessible to that account owner. To share data with your team, see [Sharing data with your team](#sharing-data-with-your-team) below.
</Note>

## Setup guide

<Steps>
  <Step title="Create an access token">
    Choose one of the following options to create an access token:

    <Tabs>
      <Tab title="Regular User Account">
        [MotherDuck documentation](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#authentication-using-an-access-token)

        1. Navigate to **Settings → Access Tokens** in MotherDuck
        2. Click **"Create token"**
        3. Fill in the token details
        4. Select **"Read/Write Token"** as the token type (required for the pipeline to write data)
        5. Click **"Create token"**

        <Frame>
          <img src="https://mintcdn.com/artie/oPuRA-Wniixw48LR/assets/motherduck-user-account.webp?fit=max&auto=format&n=oPuRA-Wniixw48LR&q=85&s=521d7cf0912698d6a308b7bf1d630052" alt="MotherDuck Settings page showing the Create Token dialog with Read/Write token type selected" width="1688" height="968" data-path="assets/motherduck-user-account.webp" />
        </Frame>

        <Warning>
          Copy the token immediately - it's only shown once!
        </Warning>
      </Tab>

      <Tab title="Service Account (Admin only)">
        [MotherDuck documentation](https://motherduck.com/docs/key-tasks/service-accounts-guide/)

        1. Navigate to **Organization Settings -> Service Accounts** in MotherDuck
        2. Click **"Create Service Account"**
        3. After creating the service account, open it and generate an access token
        4. Select **"Read/Write Token"** as the token type (required for the pipeline to write data)

        <Frame>
          <img src="https://mintcdn.com/artie/oPuRA-Wniixw48LR/assets/motherduck-service-account.webp?fit=max&auto=format&n=oPuRA-Wniixw48LR&q=85&s=b87e08fa70acb6ba561908e4caad33c9" alt="MotherDuck Organization Settings showing the Service Accounts section with token creation" width="1719" height="1052" data-path="assets/motherduck-service-account.webp" />
        </Frame>

        <Warning>
          Copy the token immediately - it's only shown once!
        </Warning>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify your pipeline database">
    Once your pipeline is running, log into MotherDuck with the account you used to create the access token. You should see the database created by your pipeline in the databases list.

    <Note>
      If using a service account, you'll need to **impersonate the service account** to see the database (Admin only).
    </Note>
  </Step>
</Steps>

## Sharing data with your team

By default, data is only accessible to the account that created it. To give your team access, create an organization share and have team members attach it.

<Steps>
  <Step title="Create an organization share">
    1. Click the trident menu (⋮) next to your pipeline database and select **"Share"**
    2. Configure the share with:
       * **Access:** Anyone in my organization
       * **Discoverable:** Enabled
       * **Auto-updating:** Enabled

    <Note>
      If using a service account, make sure you're impersonating the service account when creating the share.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/artie/oPuRA-Wniixw48LR/assets/motherduck-share-database.webp?fit=max&auto=format&n=oPuRA-Wniixw48LR&q=85&s=fb69fd026322296d7ec580fa0d834961" alt="MotherDuck database sharing dialog configured for organization-wide access with auto-updating enabled" width="1719" height="989" data-path="assets/motherduck-share-database.webp" />
    </Frame>
  </Step>

  <Step title="Team members attach the share">
    Team members can find the shared database in their MotherDuck workspace under **"Shared with me"**. Click **"Attach"** to access the data.

    <Frame>
      <img src="https://mintcdn.com/artie/oPuRA-Wniixw48LR/assets/motherduck-attach-database.webp?fit=max&auto=format&n=oPuRA-Wniixw48LR&q=85&s=d61cccc4e1e0e0c62f9b877a1a39f331" alt="MotherDuck workspace showing the Shared with me section with an Attach button" width="468" height="638" data-path="assets/motherduck-attach-database.webp" />
    </Frame>
  </Step>
</Steps>
