Skip to content
Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrating with Looker

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 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.

Last updated

Was this helpful?