# Looker with MotherDuck
> Connect Looker (Google Cloud core) to MotherDuck using the Postgres endpoint, including the required compatibility-mode parameter and recommended pooling and token settings.
:::info[Preview]
The Postgres endpoint is in [preview](/about-motherduck/feature-stages/). Features and behavior may change.
:::

[Looker (Google Cloud core)](https://cloud.google.com/looker) connects to MotherDuck through the [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/) using its standard PostgreSQL dialect. A Looker-specific compatibility mode is required so that symmetric aggregates and Persistent Derived Tables (PDTs) work correctly.

## Before you start

You'll need:

- A [Looker](https://cloud.google.com/looker) instance and admin access to create database connections
- A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) (see [Choose the right token](#choose-the-right-token) below)
- Your Postgres host, which you can find at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres) (for example, `pg.us-east-1-aws.motherduck.com`)

## Connect to MotherDuck

In Looker, go to **Admin → Connections → Add Connection** and configure:

| Parameter | Value |
|---|---|
| **Dialect** | PostgreSQL 9.5+ |
| **Host** | Your MotherDuck Postgres host (for example, `pg.us-east-1-aws.motherduck.com`) |
| **Port** | `5432` |
| **Database** | Your MotherDuck database name |
| **Username** | `postgres` |
| **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) (see [Choose the right token](#choose-the-right-token)) |
| **SSL** | Enabled |
| **Verify SSL** | Disabled, unless your Looker instance is configured for certificate verification |
| **Additional JDBC Parameters** | `options=--compatibility-mode=looker` |

![Looker database and authentication settings for a MotherDuck Postgres endpoint connection](/img/integrations/looker-database-authentication-settings.png)

In **Optional Settings**, enable **SSL** and **Database Connection Pooling**. Leave **Verify SSL** disabled unless your Looker instance is configured to verify the server certificate.

![Looker optional settings with SSL and database connection pooling enabled](/img/integrations/looker-optional-settings.png)

After configuring the connection, click **Test these settings**. The test runs against MotherDuck and produces a known cancellation warning that is safe to ignore (see [Connection test behavior](#connection-test-behavior)). Click **Add Connection** to save.

## Required: compatibility mode parameter

You **must** set the following in the **Additional JDBC Parameters** field:

```text
options=--compatibility-mode=looker
```

This parameter does two important things:

- Enables symmetric aggregates
- Enables Persistent Derived Table (PDT) support

Without it, symmetric aggregate queries return incorrect results and PDT builds fail.

## Enable connection pooling

Enable **database connection pooling** in Looker's connection settings. DuckDB is optimized for large analytical queries rather than high volumes of short concurrent connections, so pooling reduces connection overhead and improves overall stability. This is the recommended configuration for MotherDuck.

## Choose the right token

MotherDuck supports two token types. Choose based on how your Looker deployment will use the connection:

| Token type | Use when | Notes |
|---|---|---|
| **Read scaling token** | Reporting / BI usage with many concurrent users (reads only) | Recommended for the main Looker connection when PDT writes are not needed on this connection. |
| **Read/write token** | PDT builds, or any connection that needs to write tables | Looker supports configuring a separate PDT connection — you can use a read/write token there while keeping a read scaling token on the main connection. |

## Connection test behavior

When you run Looker's built-in connection test, you may see a warning that query cancellation does not work. This is expected and can be safely ignored. The warning is produced because the test cancellation query itself fails due to memory consumption — not because the cancellation mechanism is broken. Production query cancellation is unaffected.

## Troubleshooting

| Symptom | Resolution |
|---|---|
| Symmetric aggregate queries fail or return incorrect results | Ensure `options=--compatibility-mode=looker` is set in Additional JDBC Parameters. |
| PDT build fails or Explore intermittently errors | Check **Admin → PDT → PDT Details** for build status and last SQL. Confirm the table exists in your MotherDuck scratch schema. |
| Connection test shows cancellation warning | Expected behavior. The warning appears only during the test query and does not affect production query cancellation. |

## Additional information

- [Postgres endpoint reference](/sql-reference/postgres-endpoint) for connection parameters, SSL options, and limitations
- [Connect through the Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/) for a general how-to guide
- [Looker documentation: Connecting Looker to your database](https://cloud.google.com/looker/docs/db-config-postgresql)


---

## 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/bi-tools/looker/",
  "page_title": "Looker with MotherDuck",
  "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.
