> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/bi/integrating-with-looker.md). Agents can also search and read this documentation through its [MCP server](https://integrations.drivetrain.ai/~gitbook/mcp).

# Integrating with Looker

Import Looker Looks and query results into Drivetrain with a Looker API key. Covers the Looker account and role, the API key, connecting and adding data.

Drivetrain imports the results of Looker Looks, Explore queries and SQL Runner queries into Drivetrain, using a Looker API key. Nothing is written back to Looker, and Drivetrain doesn't send its own data to Looker. You connect it yourself.

## Before you start

* **In Drivetrain:** an admin. A workspace can have one Looker connection.
* **In Looker:** a Looker admin, to create the account and its API key.
* **What you can import:** Looks, Explore queries and SQL Runner queries. Dashboards can't be imported; import the Looks or queries behind them.

## Step 1: Create a Looker account for Drivetrain

Use a dedicated account so you can manage or revoke Drivetrain's access on its own.

1. In Looker, go to **Admin → Users**.
2. Click **Add → Service Account**. Enter a **Service Account Name**, keep **Create default set of API credentials** on, and click **Save**. On older Looker versions without service accounts, add a regular user (**Add → Users**) with an email address your team controls and create its key with **Edit Keys**.
3. Give the account a role with access to the models behind the data you'll import, with the `access_data`, `see_looks` and `explore` permissions, plus `use_sql_runner` if you'll import SQL Runner queries. The default **Developer** role includes all of these.

## Step 2: Get the API key

1. In **Admin → Users**, open the account's **Edit User** page.
2. In **API Keys**, click **Manage** (on older Looker versions, **Edit Keys**). Use the default key or click **Create New API Key**.
3. Copy the **Client ID** and **Client Secret**.
4. Note your Looker **Subdomain**: the first part of your Looker address, for example `mycompany` in `https://mycompany.looker.com`.

See Looker's [user and service account documentation](https://docs.cloud.google.com/looker/docs/admin-panel-users-users) for details.

## Step 3: Connect Looker in Drivetrain

1. Go to **Data**, click **+** (or **Add data source** if nothing is connected yet) and select **Looker**.
2. Under **Connect your Looker account**, enter the **Subdomain**, **Client ID** and **Client secret**, then click **Submit**.
3. You see **Looker integration connected**, and the **Sync data from Looker** window opens.

## Step 4: Add data

1. Open the Look, Explore query or SQL Runner query in Looker and copy the link from the address bar. Drivetrain reads:
   * an Explore query link containing `qid=` (run the Explore first, then copy the address),
   * a SQL Runner link containing `/sql/`,
   * a Look link containing `/looks/`.
2. In the **Sync data from Looker** window, paste it into **Looker dataset link**, enter a name in **Name the dataset**, and click **Add**.
3. To add more later, open the Looker connection on the **Data** page and click **Add data**.

Each link becomes one dataset holding the query's results.

## Changing or removing access

* **Rotate the API key:** contact your customer success manager before you delete the old key. **Edit credentials** doesn't currently apply a new Looker key to syncs.
* **Disconnect:** on the **Data** page, open the Looker connection's menu and click **Remove**. Then delete the API key or the account in Looker.

## Troubleshooting

* **Connection active and limited to only 1:** a Looker connection already exists in this workspace. Use **Add data** on it instead.
* **Invalid table URL provided:** the link isn't a Look, Explore query (`qid=`) or SQL Runner (`/sql/`) link, for example a dashboard link.
* **Table with the same URL already exists:** that Look or query is already added.
* **Table with the same name already exists:** choose a different dataset name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.drivetrain.ai/integration-guide/readme/bi/integrating-with-looker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
