Skip to content

Looker

Looker dashboards, Looks, explores, lineage, schedules and System Activity usage as SQL tables

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/looker/index.md to help me query Looker with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Find your most-viewed dashboards

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT title, folder_path, owner, view_count
FROM looker.main.dashboards
WHERE NOT deleted
ORDER BY view_count DESC
LIMIT 10

Quick start

Choose where to run Looker, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'looker' AS looker (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-looker'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

looker credentials

Looker instance API URL plus an API client id / client secret pair

Get these credentials β†’
secret.sql
CREATE SECRET looker (
    TYPE looker,
    base_url      '<base_url>',
    client_id     '<client_id>',
    client_secret '<LOOKER_CLIENT_SECRET>',  -- secret
    web_url       '<web_url>',
    page_size     '<page_size>'
);
Credential fields and requirements β†’

4. Run a query

query.sql
SELECT title, folder_path, owner, view_count
FROM looker.main.dashboards
WHERE NOT deleted
ORDER BY view_count DESC
LIMIT 10
More example queries β†’
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'looker' AS looker (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Looker metadata and usage as SQL: dashboards, tiles, Looks, folders, users, connections, LookML explores and lineage, schedules, alerts and System Activity, read-only.

Catalog

Everything looker exposes once attached β€” read straight from the worker's released build.

looker 1 schema
main 20 tables Β· 2 functions

Looker content, admin, LookML lineage, delivery and System Activity usage.

Schema examples (12)
Examples (12)

Profile every column of Look 42 (min, max, distinct and null counts)

SUMMARIZE SELECT * FROM looker.main.run_look('42', row_limit := 100);

How many rows a Look returns

SELECT count(*) AS result_rows FROM looker.main.run_look('42');

Profile the columns behind a dashboard tile's query

SUMMARIZE SELECT * FROM looker.main.run_query('101', row_limit := 50);

Count the rows a query returns

SELECT count(*) AS result_rows FROM looker.main.run_query('101');
8 more examples

Most-viewed dashboards with their folder path

SELECT title, folder_path, owner, view_count
FROM looker.main.dashboards
WHERE NOT deleted
ORDER BY view_count DESC
LIMIT 10;

Dashboards nobody has opened in 90 days

SELECT id, title, owner, last_viewed_at
FROM looker.main.dashboards
WHERE last_viewed_at < now() - INTERVAL 90 DAY
ORDER BY last_viewed_at;

Which explores feed the most dashboard tiles

SELECT model, explore, count(*) AS tiles
FROM looker.main.dashboard_elements
WHERE explore IS NOT NULL
GROUP BY ALL
ORDER BY tiles DESC;

Tiles on one dashboard and the queries behind them

SELECT id, title, vis_type, query_id
FROM looker.main.dashboard_elements
WHERE dashboard_id = '1'
ORDER BY id;

Looks per folder

SELECT folder_path, count(*) AS looks, sum(view_count) AS views
FROM looker.main.looks
GROUP BY ALL
ORDER BY views DESC;

Public Looks and who owns them

SELECT id, title, owner, short_url
FROM looker.main.looks
WHERE public
ORDER BY id;

Charts per explore across tiles and Looks

SELECT chart_kind, count(*) AS charts
FROM looker.main.charts
GROUP BY ALL
ORDER BY chart_kind;

UNION-ready chart inventory

SELECT tool, chart_kind, id, title, url
FROM looker.main.charts
WHERE chart_kind = 'look'
ORDER BY id;
Tables
alerts 2 examples22 cols

Dashboard-tile alerts: field, condition, threshold, schedule and owner; recipients as counts and domains.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Alert id.
title VARCHAR
Custom alert title.
description VARCHAR
Alert description.
owner VARCHAR
Display name of the alert's owner.
owner_id VARCHAR
Id of the alert's owner.
dashboard_element_id VARCHAR
Dashboard tile the alert watches.
lookml_dashboard_id VARCHAR
LookML dashboard the alert watches.
field_name VARCHAR
Field the alert evaluates.
field_title VARCHAR
Title of the field the alert evaluates.
comparison_type VARCHAR
Condition: EQUAL_TO, GREATER_THAN, INCREASES_BY …
threshold DOUBLE
Value the field is compared with, in the field's own units (or percent for INCREASES_BY / DECREASES_BY).
cron VARCHAR
How often the alert is checked (cron).
is_disabled BOOLEAN
Whether the alert is disabled.
disabled_reason VARCHAR
Why the alert was disabled.
is_public BOOLEAN
Visible to other users.
followable BOOLEAN
Other users can follow it.
investigative_content_type VARCHAR
Linked content type (dashboard).
investigative_content_id VARCHAR
Linked content id.
destination_count INTEGER
Number of destinations.
destination_types VARCHAR[]
Destination types: EMAIL, ACTION_HUB.
recipient_domains VARCHAR[]
Distinct email domains of the recipients (never the addresses).
ConstraintsPRIMARY KEY (id)
Examples (2)

Disabled alerts and why

SELECT id, title, owner, disabled_reason
FROM looker.main.alerts
WHERE is_disabled
ORDER BY id;

Alerts per watched field

SELECT field_name, comparison_type, count(*) AS alerts
FROM looker.main.alerts
GROUP BY ALL
ORDER BY alerts DESC;
Link
charts 2 examples16 cols

Every chart in Looker: dashboard tiles and saved Looks, in the shared BI column layout.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
chart_kindnot null VARCHAR
'tile' (dashboard element) or 'look' (saved Look).
idnot null VARCHAR
Tile or Look id (unique within chart_kind).
title VARCHAR
Chart title.
dashboard_id VARCHAR
Dashboard the tile is on (NULL for Looks).
folder_path VARCHAR
Slash-separated folder path from the root, e.g. /Shared/Marketing.
owner VARCHAR
Display name of the user who owns (created) the object.
created_at TIMESTAMP WITH TIME ZONE
When the chart was created (Looks only).
updated_at TIMESTAMP WITH TIME ZONE
When the chart was last updated (Looks only).
last_viewed_at TIMESTAMP WITH TIME ZONE
When the chart was last viewed (Looks only).
view_count BIGINT
Number of views (Looks only).
url VARCHAR
Web UI link to the Look or the tile's dashboard.
query_id VARCHAR
Id of the chart's query.
model VARCHAR
LookML model.
explore VARCHAR
Explore queried (tiles only; join queries for Looks).
vis_type VARCHAR
Visualization type (tiles only).
ConstraintsPRIMARY KEY (chart_kind, id)
Examples (2)

Charts per explore across tiles and Looks

SELECT chart_kind, count(*) AS charts
FROM looker.main.charts
GROUP BY ALL
ORDER BY chart_kind;

UNION-ready chart inventory

SELECT tool, chart_kind, id, title, url
FROM looker.main.charts
WHERE chart_kind = 'look'
ORDER BY id;
Link
connections 2 examples20 cols

Database connections (the data sources): dialect, host, database, schema; never passwords or certificates.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Connection name (Looker's connection id).
title VARCHAR
Connection name.
dialect VARCHAR
SQL dialect name.
dialect_label VARCHAR
Human-readable dialect.
host VARCHAR
Database host (or BigQuery project).
port INTEGER
TCP port of the database server (NULL when the dialect has none).
database VARCHAR
Database name (or BigQuery dataset project).
schema VARCHAR
Default schema.
username VARCHAR
Database user name (not a secret; the password is never returned).
ssl BOOLEAN
SSL enabled.
verify_ssl BOOLEAN
SSL certificate verification enabled.
tmp_db_name VARCHAR
Scratch schema for persistent derived tables.
pdts_enabled BOOLEAN
Persistent derived tables enabled.
max_connections INTEGER
Maximum concurrent database connections Looker opens (pool size).
uses_oauth BOOLEAN
Users authenticate with OAuth.
created_at TIMESTAMP WITH TIME ZONE
When the connection was created.
owner_id VARCHAR
Id of the user who created the connection.
example BOOLEAN
A Looker example connection.
url VARCHAR
Admin page for the connection.
ConstraintsPRIMARY KEY (id)
Examples (2)

Connections per dialect

SELECT dialect, count(*) AS connections
FROM looker.main.connections
GROUP BY ALL
ORDER BY connections DESC;

Explores per connection

SELECT c.id, c.dialect, count(e.explore_name) AS explores
FROM looker.main.connections c
LEFT JOIN looker.main.explores e ON e.connection_name = c.id
GROUP BY ALL
ORDER BY explores DESC;
Link
content_usage 2 examples9 cols

Views per dashboard and Look per day, from System Activity (history).

Columns
tool VARCHAR
The BI tool: always 'looker'.
content_typenot null VARCHAR
'dashboard' or 'look'.
content_idnot null VARCHAR
Dashboard or Look id.
title VARCHAR
Dashboard or Look title.
view_datenot null DATE
UTC day of the views.
view_count BIGINT
Views that day (dashboard runs / Look page runs).
user_count BIGINT
Distinct users who viewed it that day.
last_view_date DATE
Latest day with a view of this content in the scanned window.
url VARCHAR
Web UI link to the content.
ConstraintsPRIMARY KEY (content_type, content_id, view_date)
Examples (2)

Top dashboards by views over the last 30 days

SELECT content_id, title, sum(view_count) AS views,
  max(user_count) AS peak_daily_users
FROM looker.main.content_usage
WHERE content_type = 'dashboard'
GROUP BY ALL
ORDER BY views DESC
LIMIT 10;

Daily dashboard views for one week

SELECT view_date, sum(view_count) AS views
FROM looker.main.content_usage
WHERE view_date >= DATE '2026-11-01' AND view_date < DATE '2026-11-08'
GROUP BY ALL
ORDER BY view_date;
Link
dashboard_elements 2 examples18 cols

Dashboard tiles (elements) with the look, query, model and explore each one runs.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Dashboard element id.
dashboard_id VARCHAR
Id of the dashboard the tile is on.
title VARCHAR
Tile title.
type VARCHAR
Element type: vis, text, button, data_vis …
subtitle_text VARCHAR
Tile subtitle.
note_text VARCHAR
Tile note.
body_text VARCHAR
Body of a text tile.
look_id VARCHAR
Id of the Look the tile shows, if any.
query_id VARCHAR
Id of the query the tile runs (its own, its result maker's or its look's).
result_maker_id VARCHAR
Id of the tile's result maker.
merge_result_id VARCHAR
Id of the merged-results query, if any.
model VARCHAR
LookML model of the tile's query.
explore VARCHAR
Explore (LookML view) of the tile's query.
fields VARCHAR[]
Fields the tile's query selects.
vis_type VARCHAR
Visualization type, e.g. looker_line.
listens_to STRUCT(dashboard_filter_name VARCHAR, field VARCHAR)[]
Dashboard filters this tile listens to and the field each one filters.
url VARCHAR
Web UI link to the tile's dashboard.
ConstraintsPRIMARY KEY (id)
Examples (2)

Which explores feed the most dashboard tiles

SELECT model, explore, count(*) AS tiles
FROM looker.main.dashboard_elements
WHERE explore IS NOT NULL
GROUP BY ALL
ORDER BY tiles DESC;

Tiles on one dashboard and the queries behind them

SELECT id, title, vis_type, query_id
FROM looker.main.dashboard_elements
WHERE dashboard_id = '1'
ORDER BY id;
Link
dashboards 2 examples24 cols

User-defined Looker dashboards with folder path, owner, usage counters and dashboard filters.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Dashboard id.
title VARCHAR
Dashboard title.
description VARCHAR
Dashboard description.
folder_id VARCHAR
Id of the folder holding the dashboard.
folder_path VARCHAR
Slash-separated folder path from the root, e.g. /Shared/Marketing.
owner VARCHAR
Display name of the user who owns (created) the object.
owner_id VARCHAR
Id of the user who created the dashboard.
created_at TIMESTAMP WITH TIME ZONE
When the dashboard was created.
updated_at TIMESTAMP WITH TIME ZONE
When the dashboard was last updated.
last_viewed_at TIMESTAMP WITH TIME ZONE
When the dashboard was last viewed.
last_accessed_at TIMESTAMP WITH TIME ZONE
When the dashboard was last accessed (viewed or run via API).
view_count BIGINT
Number of times the dashboard has been viewed.
favorite_count BIGINT
Number of users who favorited the dashboard.
url VARCHAR
Web UI link to the dashboard.
slug VARCHAR
Dashboard slug (an alternative id used in URLs).
hidden BOOLEAN
Whether the dashboard is hidden from browse.
readonly BOOLEAN
Whether the dashboard is read-only.
deleted BOOLEAN
Whether the dashboard is soft-deleted (in Trash).
deleted_at TIMESTAMP WITH TIME ZONE
When the dashboard was moved to Trash.
refresh_interval VARCHAR
Auto-refresh interval, e.g. '1 hour'.
query_timezone VARCHAR
Timezone the dashboard's queries run in.
preferred_viewer VARCHAR
Preferred viewer: dashboards-next or dashboards.
filters STRUCT of 9 fields[]
Dashboard filters: name, title, type, default value and the field they filter.
STRUCT[] 9 fields
  • nameVARCHAR
  • titleVARCHAR
  • typeVARCHAR
  • default_valueVARCHAR
  • modelVARCHAR
  • exploreVARCHAR
  • dimensionVARCHAR
  • allow_multiple_valuesBOOLEAN
  • requiredBOOLEAN
ConstraintsPRIMARY KEY (id)
Examples (2)

Most-viewed dashboards with their folder path

SELECT title, folder_path, owner, view_count
FROM looker.main.dashboards
WHERE NOT deleted
ORDER BY view_count DESC
LIMIT 10;

Dashboards nobody has opened in 90 days

SELECT id, title, owner, last_viewed_at
FROM looker.main.dashboards
WHERE last_viewed_at < now() - INTERVAL 90 DAY
ORDER BY last_viewed_at;
Link
explore_fields 2 examples20 cols

Dimensions, measures, filters and parameters of each explore, with view, SQL and the view's table.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
model_namenot null VARCHAR
LookML model.
explore_namenot null VARCHAR
Explore as named in the LookML model (the `view` of a query).
field_namenot null VARCHAR
Fully qualified field name (view.field).
category VARCHAR
dimension, measure, filter or parameter.
type VARCHAR
LookML type, e.g. string, number, count_distinct, date_date, yesno.
label VARCHAR
Field label.
label_short VARCHAR
Short label (without view label).
description VARCHAR
Field description.
view VARCHAR
View alias the field belongs to.
view_label VARCHAR
Group label the field picker shows the field under.
sql_table_name VARCHAR
Warehouse table of the field's view (NULL for derived tables).
sql VARCHAR
LookML SQL of the field.
hidden BOOLEAN
Hidden from the field picker.
primary_key BOOLEAN
Primary key of its view.
is_numeric BOOLEAN
Numeric field.
is_timeframe BOOLEAN
A dimension_group timeframe.
dimension_group VARCHAR
Dimension group it belongs to.
tags VARCHAR[]
Field tags.
source_file VARCHAR
LookML file defining the field.
ConstraintsPRIMARY KEY (model_name, explore_name, field_name)
Examples (2)

Measures of one explore

SELECT field_name, type, sql
FROM looker.main.explore_fields
WHERE model_name = 'thelook' AND explore_name = 'orders' AND category = 'measure'
ORDER BY field_name;

Fields per warehouse table

SELECT sql_table_name, count(*) AS fields
FROM looker.main.explore_fields
WHERE model_name = 'thelook'
GROUP BY ALL
ORDER BY fields DESC;
Link
explore_tables 2 examples14 cols

Lineage: the warehouse tables (sql_table_name) behind each explore's base view and joins.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
model_namenot null VARCHAR
LookML model.
explore_namenot null VARCHAR
Explore as named in the LookML model (the `view` of a query).
view_namenot null VARCHAR
View alias in the explore.
source_view VARCHAR
LookML view the alias reads (join `from`).
role VARCHAR
'base' for the explore's base view, 'join' for joined views.
join_type VARCHAR
Join type (left_outer, inner, full_outer, cross).
relationship VARCHAR
Join relationship (many_to_one …).
sql_on VARCHAR
Join condition.
sql_table_name VARCHAR
sql_table_name as written in LookML.
table_catalog VARCHAR
Database / project part of sql_table_name.
table_schema VARCHAR
Schema / dataset part of sql_table_name.
table_name VARCHAR
Table part of sql_table_name.
connection_name VARCHAR
Database connection of the explore.
ConstraintsPRIMARY KEY (model_name, explore_name, view_name)
Examples (2)

Warehouse tables used by one model

SELECT DISTINCT table_schema, table_name
FROM looker.main.explore_tables
WHERE model_name = 'thelook' AND table_name IS NOT NULL
ORDER BY ALL;

Which dashboards depend on a table (via tile queries)

SELECT DISTINCT d.title
FROM looker.main.explore_tables t
JOIN looker.main.dashboard_elements e ON e.model = t.model_name AND e.explore = t.explore_name
JOIN looker.main.dashboards d ON d.id = e.dashboard_id
WHERE t.table_name = 'orders'
ORDER BY d.title;
Link
explores 2 examples16 cols

LookML explores: base view, sql_table_name, connection, joins and field counts.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
model_namenot null VARCHAR
LookML model.
explore_namenot null VARCHAR
Explore as named in the LookML model (the `view` of a query).
label VARCHAR
Explore label.
description VARCHAR
Explore description.
group_label VARCHAR
Explore menu group.
hidden BOOLEAN
Hidden from the explore menu.
view_name VARCHAR
Base view of the explore.
sql_table_name VARCHAR
Warehouse table of the base view (NULL for derived tables).
connection_name VARCHAR
Database connection.
project_name VARCHAR
LookML project.
join_count INTEGER
Number of joined views.
dimension_count INTEGER
Number of dimensions.
measure_count INTEGER
Number of measures.
tags VARCHAR[]
Explore tags.
url VARCHAR
Web UI link to the explore.
ConstraintsPRIMARY KEY (model_name, explore_name)
Examples (2)

Explores of one model with their base tables

SELECT explore_name, view_name, sql_table_name, join_count
FROM looker.main.explores
WHERE model_name = 'thelook'
ORDER BY explore_name;

Largest explores by field count

SELECT model_name, explore_name, dimension_count + measure_count AS fields
FROM looker.main.explores
ORDER BY fields DESC
LIMIT 10;
Link
folders 2 examples15 cols

Content folders with their full path, parent, owner and type flags.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Folder id.
title VARCHAR
Folder name.
parent_id VARCHAR
Id of the parent folder (NULL at the root).
folder_path VARCHAR
Full path of this folder, e.g. /Shared/Marketing.
owner VARCHAR
Display name of the user who owns (created) the object.
owner_id VARCHAR
Id of the user who created the folder.
created_at TIMESTAMP WITH TIME ZONE
When the folder was created.
child_count BIGINT
Number of child folders.
is_personal BOOLEAN
A user's personal folder.
is_personal_descendant BOOLEAN
Inside a personal folder.
is_shared_root BOOLEAN
The Shared root folder.
is_users_root BOOLEAN
The Users root folder.
is_embed BOOLEAN
An embed folder.
url VARCHAR
Web UI link to the folder.
ConstraintsPRIMARY KEY (id)
Examples (2)

Folders directly under Shared

SELECT f.title, f.folder_path, f.child_count
FROM looker.main.folders f
WHERE f.parent_id = (SELECT id FROM looker.main.folders WHERE is_shared_root)
ORDER BY f.title;

Personal folders and their owners

SELECT title, owner, folder_path
FROM looker.main.folders
WHERE is_personal
ORDER BY title;
Link
groups 2 examples9 cols

Looker user groups with member counts and external (SAML/LDAP/SCIM) mapping.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Group id.
name VARCHAR
Group name.
user_count BIGINT
Number of users in the group.
externally_managed BOOLEAN
Managed by an external system (SCIM/LDAP/SAML).
external_group_id VARCHAR
Id of the group in the external system.
include_by_default BOOLEAN
New users join the group by default.
can_add_to_content_metadata BOOLEAN
Group can be given content access.
url VARCHAR
Admin page for the group.
ConstraintsPRIMARY KEY (id)
Examples (2)

Largest groups

SELECT name, user_count
FROM looker.main.groups
ORDER BY user_count DESC
LIMIT 10;

Groups synced from an identity provider

SELECT name, external_group_id
FROM looker.main.groups
WHERE externally_managed
ORDER BY name;
Link
lookml_models 2 examples9 cols

LookML models: project, allowed connections and the explores they define.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
namenot null VARCHAR
Model name.
label VARCHAR
Model label.
project_name VARCHAR
LookML project defining the model.
allowed_connections VARCHAR[]
Connections the model may use.
unlimited_db_connections BOOLEAN
Model may use any connection.
has_content BOOLEAN
Model has saved content.
explore_count INTEGER
Number of explores.
explores STRUCT of 5 fields[]
Explores defined by the model.
STRUCT[] 5 fields
  • nameVARCHAR
  • labelVARCHAR
  • descriptionVARCHAR
  • group_labelVARCHAR
  • hiddenBOOLEAN
ConstraintsPRIMARY KEY (name)
Examples (2)

Explores per model

SELECT name, project_name, explore_count
FROM looker.main.lookml_models
ORDER BY explore_count DESC;

Hidden explores

SELECT m.name AS model, e.name AS explore
FROM looker.main.lookml_models m,
     unnest(m.explores) AS t(e)
WHERE e.hidden
ORDER BY ALL;
Link
looks 2 examples21 cols

Saved Looks with folder path, owner, query id and usage counters.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Look id.
title VARCHAR
Look title.
description VARCHAR
Look description.
folder_id VARCHAR
Id of the folder holding the Look.
folder_path VARCHAR
Slash-separated folder path from the root, e.g. /Shared/Marketing.
owner VARCHAR
Display name of the user who owns (created) the object.
owner_id VARCHAR
Id of the user who created the Look.
created_at TIMESTAMP WITH TIME ZONE
When the Look was created.
updated_at TIMESTAMP WITH TIME ZONE
When the Look was last updated.
last_viewed_at TIMESTAMP WITH TIME ZONE
When the Look was last viewed.
view_count BIGINT
Number of times the Look has been viewed.
favorite_count BIGINT
Number of users who favorited the Look.
url VARCHAR
Web UI link to the Look.
query_id VARCHAR
Id of the Look's query.
model VARCHAR
LookML model the Look queries.
public BOOLEAN
Whether the Look has a public URL.
short_url VARCHAR
Short relative URL of the Look.
deleted BOOLEAN
Whether the Look is soft-deleted (in Trash).
deleted_at TIMESTAMP WITH TIME ZONE
When the Look was moved to Trash.
last_updater_id VARCHAR
Id of the user who last updated the Look.
ConstraintsPRIMARY KEY (id)
Examples (2)

Looks per folder

SELECT folder_path, count(*) AS looks, sum(view_count) AS views
FROM looker.main.looks
GROUP BY ALL
ORDER BY views DESC;

Public Looks and who owns them

SELECT id, title, owner, short_url
FROM looker.main.looks
WHERE public
ORDER BY id;
Link
project_branches 2 examples18 cols

Git branches of each LookML project: production flag, ahead/behind counts, last commit time.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
project_idnot null VARCHAR
LookML project id.
namenot null VARCHAR
Branch name.
is_production BOOLEAN
The production branch.
personal BOOLEAN
A personal (dev) branch.
readonly BOOLEAN
Read-only for the API user.
is_local BOOLEAN
Exists locally on the Looker instance.
is_remote BOOLEAN
Exists on the remote.
remote VARCHAR
Remote name.
remote_name VARCHAR
Branch name on the remote.
ahead_count BIGINT
Number of local commits not yet pushed to the remote.
behind_count BIGINT
Number of remote commits not yet pulled.
commit_at TIMESTAMP WITH TIME ZONE
Time of the branch's head commit.
ref VARCHAR
Head commit SHA.
remote_ref VARCHAR
Remote head commit SHA.
owner_name VARCHAR
Owner of a personal branch.
error VARCHAR
Git error, if any.
message VARCHAR
Git status message.
ConstraintsPRIMARY KEY (project_id, name)
Examples (2)

Stale branches behind production

SELECT project_id, name, behind_count, commit_at
FROM looker.main.project_branches
WHERE behind_count > 0
ORDER BY behind_count DESC;

Production branch head per project

SELECT project_id, name, ref, commit_at
FROM looker.main.project_branches
WHERE is_production
ORDER BY project_id;
Link
projects 2 examples14 cols

LookML projects with git configuration (remote, production branch, PR mode); no git credentials.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Project id.
name VARCHAR
Project name.
uses_git BOOLEAN
Project is backed by git.
git_remote_url VARCHAR
Git remote URL (credentials removed).
git_service_name VARCHAR
Git service, e.g. github.
production_branch VARCHAR
Production branch name (NULL = default branch).
pull_request_mode VARCHAR
Pull request mode: off, links, recommended, required.
validation_required BOOLEAN
LookML must validate before commit.
git_release_mgmt_enabled BOOLEAN
Advanced deploy mode is on.
allow_warnings BOOLEAN
Commits allowed with LookML warnings.
is_example BOOLEAN
A Looker example project.
dependency_status VARCHAR
Remote dependency status.
url VARCHAR
IDE link to the project.
ConstraintsPRIMARY KEY (id)
Examples (2)

Projects that do not require pull requests

SELECT name, pull_request_mode, production_branch
FROM looker.main.projects
WHERE uses_git AND pull_request_mode <> 'required'
ORDER BY name;

Models per project

SELECT p.name, count(m.name) AS models
FROM looker.main.projects p
LEFT JOIN looker.main.lookml_models m ON m.project_name = p.id
GROUP BY ALL
ORDER BY models DESC;
Link
queries 2 examples22 cols

The queries behind dashboard tiles and Looks: model, explore, fields, filters, sorts and limits.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Query id.
model VARCHAR
LookML model.
explore VARCHAR
Explore (Looker calls it `view`).
fields VARCHAR[]
Selected fields (dimensions, measures, table calculations).
pivots VARCHAR[]
Pivoted fields.
fill_fields VARCHAR[]
Fields with fill-in of missing values.
filters STRUCT(field VARCHAR, "value" VARCHAR)[]
Filters as {field, value} using Looker filter expressions.
filter_expression VARCHAR
Custom filter expression.
sorts VARCHAR[]
Sort fields, e.g. 'orders.count desc'.
row_limit BIGINT
Maximum rows the query returns (Looker `limit`).
column_limit BIGINT
Maximum number of pivot columns.
total BOOLEAN
Whether column totals are computed.
row_total VARCHAR
Row totals mode (right / left / NULL).
subtotals VARCHAR[]
Subtotalled fields.
dynamic_fields JSON
Table calculations and custom fields (JSON).
vis_type VARCHAR
Visualization type.
vis_config JSON
Visualization settings (JSON).
query_timezone VARCHAR
Timezone the query runs in.
slug VARCHAR
Query slug.
client_id VARCHAR
Query client id (used in explore URLs as qid).
url VARCHAR
Share URL that opens the query in an explore.
ConstraintsPRIMARY KEY (id)
Examples (2)

Most-used explores across tile and Look queries

SELECT model, explore, count(*) AS queries
FROM looker.main.queries
GROUP BY ALL
ORDER BY queries DESC;

Filters on the queries behind one dashboard

SELECT q.id, unnest(q.filters, recursive := true)
FROM looker.main.queries q
WHERE q.id IN (SELECT query_id FROM looker.main.dashboard_elements WHERE dashboard_id = '1');
Link
query_history 2 examples17 cols

Every query Looker ran: runtime, source, status, user, model and explore, from System Activity.

Columns
tool VARCHAR
The BI tool: always 'looker'.
history_idnot null VARCHAR
System Activity history id.
created_at TIMESTAMP WITH TIME ZONE
When the query started (UTC).
completed_at TIMESTAMP WITH TIME ZONE
When the query finished (UTC).
runtime_seconds DOUBLE
Query runtime in seconds.
status VARCHAR
complete, error, killed, running, cache_only_miss …
source VARCHAR
Where the query came from: dashboard, explore, api4, scheduled_task, look, sql_runner …
result_source VARCHAR
query (ran in the database) or cache.
connection_name VARCHAR
Database connection.
dashboard_id VARCHAR
Dashboard that ran it, if any.
look_id VARCHAR
Look that ran it, if any.
query_id VARCHAR
Query id (join queries.id).
model VARCHAR
LookML model.
explore VARCHAR
Explore queried (System Activity `query.view`).
user_id VARCHAR
User who ran it.
user_email VARCHAR
Email of the user who ran it.
message VARCHAR
Error or status message.
ConstraintsPRIMARY KEY (history_id)
Examples (2)

Slowest explores over the last 7 days

SELECT model, explore, count(*) AS runs, avg(runtime_seconds) AS avg_s,
  max(runtime_seconds) AS max_s
FROM looker.main.query_history
WHERE result_source = 'query'
GROUP BY ALL
ORDER BY avg_s DESC
LIMIT 10;

Errors by source in a fixed window

SELECT source, count(*) AS errors
FROM looker.main.query_history
WHERE status = 'error' AND created_at >= TIMESTAMPTZ '2026-11-01' AND created_at < TIMESTAMPTZ '2026-11-08'
GROUP BY ALL
ORDER BY errors DESC;
Link
roles 2 examples11 cols

Roles: permission set (with its permissions) and model set (with its models).

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Role id.
name VARCHAR
Role name.
permission_set_id VARCHAR
Id of the permission set the role grants.
permission_set_name VARCHAR
Name of the permission set the role grants.
permissions VARCHAR[]
Permissions granted.
model_set_id VARCHAR
Id of the model set the role applies to.
model_set_name VARCHAR
Name of the model set the role applies to.
models VARCHAR[]
LookML models the role applies to.
user_count BIGINT
Number of users with the role.
url VARCHAR
Admin page for the role.
ConstraintsPRIMARY KEY (id)
Examples (2)

Roles that grant admin

SELECT name, user_count
FROM looker.main.roles
WHERE list_contains(permissions, 'administer')
ORDER BY name;

Permissions per role

SELECT name, len(permissions) AS permission_count, models
FROM looker.main.roles
ORDER BY permission_count DESC;
Link
schedules 2 examples30 cols

Scheduled deliveries of dashboards, Looks and queries; recipients summarised as counts and email domains.

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
Scheduled plan id.
title VARCHAR
Schedule name.
owner VARCHAR
Display name of the schedule's owner.
owner_id VARCHAR
Id of the schedule's owner.
enabled BOOLEAN
Whether the schedule is enabled.
content_type VARCHAR
What is delivered: dashboard, look, lookml_dashboard or query.
dashboard_id VARCHAR
Delivered dashboard id.
look_id VARCHAR
Delivered Look id.
lookml_dashboard_id VARCHAR
Delivered LookML dashboard id.
query_id VARCHAR
Delivered query id.
crontab VARCHAR
Cron schedule (NULL when triggered by a datagroup).
datagroup VARCHAR
Datagroup that triggers the schedule.
timezone VARCHAR
Timezone of the crontab.
run_once BOOLEAN
One-off delivery.
run_as_recipient BOOLEAN
Runs with each recipient's permissions.
require_results BOOLEAN
Only send when there are results.
require_no_results BOOLEAN
Only send when there are no results.
require_change BOOLEAN
Only send when results changed.
send_all_results BOOLEAN
Send all results (not just the row limit).
include_links BOOLEAN
Include links back to Looker.
created_at TIMESTAMP WITH TIME ZONE
When the schedule was created.
updated_at TIMESTAMP WITH TIME ZONE
When the schedule was last updated.
last_run_at TIMESTAMP WITH TIME ZONE
When the schedule last ran.
next_run_at TIMESTAMP WITH TIME ZONE
When the schedule runs next.
destination_count INTEGER
Number of destinations.
destination_types VARCHAR[]
Destination types: email, action_hub, s3, sftp, webhook …
destination_formats VARCHAR[]
Delivery formats: csv, wysiwyg_pdf, inline_json …
recipient_domains VARCHAR[]
Distinct email domains of the recipients (never the addresses).
url VARCHAR
Web UI link to the delivered content.
ConstraintsPRIMARY KEY (id)
Examples (2)

Schedules sending outside the company domain

SELECT id, title, owner, recipient_domains
FROM looker.main.schedules
WHERE enabled AND NOT list_has_all(['example.com'], recipient_domains)
ORDER BY id;

Deliveries per format

SELECT format, count(*) AS schedules
FROM (SELECT unnest(destination_formats) AS format FROM looker.main.schedules)
GROUP BY ALL
ORDER BY schedules DESC;
Link
users 2 examples14 cols

Looker users with roles, groups and folders (no credentials).

Columns
tool VARCHAR
The BI tool this row came from: always 'looker'.
idnot null VARCHAR
User id.
display_name VARCHAR
Full display name.
email VARCHAR
Email address.
first_name VARCHAR
Given name on the Looker account.
last_name VARCHAR
Family name on the Looker account.
is_disabled BOOLEAN
Whether the account is disabled.
is_service_account BOOLEAN
Whether this is a service account.
role_ids VARCHAR[]
Ids of the roles assigned directly to the user.
group_ids VARCHAR[]
Ids of the groups the user belongs to.
home_folder_id VARCHAR
Id of the user's home folder.
personal_folder_id VARCHAR
Id of the user's personal folder.
locale VARCHAR
User locale.
url VARCHAR
Admin page for the user.
ConstraintsPRIMARY KEY (id)
Examples (2)

Active users per role

SELECT r.name AS role, count(*) AS users
FROM looker.main.users u,
     unnest(u.role_ids) AS t(role_id)
JOIN looker.main.roles r ON r.id = t.role_id
WHERE NOT u.is_disabled
GROUP BY ALL
ORDER BY users DESC;

Disabled accounts

SELECT id, email FROM looker.main.users WHERE is_disabled ORDER BY email;
Link
Table functions
run_look (look_id VARCHAR, row_limit := BIGINT) 2 examples

Run a saved Look (read-only) and return its rows, typed from the explore's field metadata.

Positional arguments
look_id VARCHAR
Id of the Look to run.
Named arguments
row_limit := BIGINT
Maximum rows to return (1–50000, default 5000). Β· default 5000
Returns columns
<view>.<dimension>` (number) DOUBLE
Numeric dimension
<view>.<measure>` (count, count_distinct) BIGINT
Count measure
<view>.<measure>` (sum, average, number …) DOUBLE
Numeric measure
<view>.<field>` (yesno) BOOLEAN
Yes/no field
<view>.<field>_date` / `_week DATE
Date timeframe
<view>.<field>_time` / `_raw TIMESTAMP
Time in the query's timezone
<view>.<field>` (other types) VARCHAR
String, tier, month, location …
<measure>` when the query pivots JSON
Object keyed by pivot value
<table_calculation>` / custom field VARCHAR
Table calculation or custom dimension (`JSON` when pivoted; custom measures `DOUBLE`)
pending VARCHAR
Placeholder; create a looker secret to get the real columns
Returns columns Β· depends on the arguments
<view>.<dimension>` (number) DOUBLE
Numeric dimension
<view>.<measure>` (count, count_distinct) BIGINT
Count measure
<view>.<measure>` (sum, average, number …) DOUBLE
Numeric measure
<view>.<field>` (yesno) BOOLEAN
Yes/no field
<view>.<field>_date` / `_week DATE
Date timeframe
<view>.<field>_time` / `_raw TIMESTAMP
Time in the query's timezone
<view>.<field>` (other types) VARCHAR
String, tier, month, location …
<measure>` when the query pivots JSON
Object keyed by pivot value
<table_calculation>` / custom field VARCHAR
Table calculation or custom dimension (`JSON` when pivoted; custom measures `DOUBLE`)
pending VARCHAR
Placeholder; create a looker secret to get the real columns
Examples (2)

Profile every column of Look 42 (min, max, distinct and null counts)

SUMMARIZE SELECT * FROM looker.main.run_look('42', row_limit := 100);

How many rows a Look returns

SELECT count(*) AS result_rows FROM looker.main.run_look('42');
Link
run_query (query_id VARCHAR, row_limit := BIGINT) 2 examples

Run a saved query (read-only) and return its rows, typed from the explore's field metadata.

Positional arguments
query_id VARCHAR
Id of the query to run.
Named arguments
row_limit := BIGINT
Maximum rows to return (1–50000, default 5000). Β· default 5000
Returns columns
<view>.<dimension>` (number) DOUBLE
Numeric dimension
<view>.<measure>` (count, count_distinct) BIGINT
Count measure
<view>.<measure>` (sum, average, number …) DOUBLE
Numeric measure
<view>.<field>` (yesno) BOOLEAN
Yes/no field
<view>.<field>_date` / `_week DATE
Date timeframe
<view>.<field>_time` / `_raw TIMESTAMP
Time in the query's timezone
<view>.<field>` (other types) VARCHAR
String, tier, month, location …
<measure>` when the query pivots JSON
Object keyed by pivot value
<table_calculation>` / custom field VARCHAR
Table calculation or custom dimension (`JSON` when pivoted; custom measures `DOUBLE`)
pending VARCHAR
Placeholder; create a looker secret to get the real columns
Returns columns Β· depends on the arguments
<view>.<dimension>` (number) DOUBLE
Numeric dimension
<view>.<measure>` (count, count_distinct) BIGINT
Count measure
<view>.<measure>` (sum, average, number …) DOUBLE
Numeric measure
<view>.<field>` (yesno) BOOLEAN
Yes/no field
<view>.<field>_date` / `_week DATE
Date timeframe
<view>.<field>_time` / `_raw TIMESTAMP
Time in the query's timezone
<view>.<field>` (other types) VARCHAR
String, tier, month, location …
<measure>` when the query pivots JSON
Object keyed by pivot value
<table_calculation>` / custom field VARCHAR
Table calculation or custom dimension (`JSON` when pivoted; custom measures `DOUBLE`)
pending VARCHAR
Placeholder; create a looker secret to get the real columns
Examples (2)

Profile the columns behind a dashboard tile's query

SUMMARIZE SELECT * FROM looker.main.run_query('101', row_limit := 50);

Count the rows a query returns

SELECT count(*) AS result_rows FROM looker.main.run_query('101');
Link

Credentials

The secret type looker declares, as reported by the worker itself.

looker

How to get these credentials

Looker instance API URL plus an API client id / client secret pair

secret.sql
CREATE SECRET looker (
    TYPE looker,
    base_url      '<base_url>',
    client_id     '<client_id>',
    client_secret '<LOOKER_CLIENT_SECRET>',  -- secret
    web_url       '<web_url>',
    page_size     '<page_size>'
);
Key Type Required Description
base_url VARCHAR β€” Looker API host, e.g. https://acme.cloud.looker.com or https://acme.looker.com:19999 (http:// only for 127.0.0.1/localhost).
client_id VARCHAR β€” API client id (Admin > Users > Edit Keys).
client_secret secret VARCHAR β€” API client secret paired with client_id.
web_url VARCHAR β€” Optional web UI origin for url columns (default: base_url without :19999).
page_size VARCHAR β€” Optional page size for search endpoints (default 500).

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching looker β€” the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

dashboards_columns β€” The dashboards columns (binds only; create a looker secret and drop LIMIT 0 for rows)

SELECT tool, id, title, folder_path, owner, view_count, url
FROM looker.main.dashboards
LIMIT 0;

Uses dashboards

query_history_columns β€” The query_history columns (binds only; create a looker secret and drop LIMIT 0 for rows)

SELECT created_at, runtime_seconds, status, source, explore
FROM looker.main.query_history
LIMIT 0;

Uses query_history

Profile every column of Look 42 (min, max, distinct and null counts)

SUMMARIZE SELECT * FROM looker.main.run_look('42', row_limit := 100)

Uses run_look

Profile the columns behind a dashboard tile's query

SUMMARIZE SELECT * FROM looker.main.run_query('101', row_limit := 50)

Uses run_query

Which explores feed the most dashboard tiles

SELECT model, explore, count(*) AS tiles
FROM looker.main.dashboard_elements
WHERE explore IS NOT NULL
GROUP BY ALL
ORDER BY tiles DESC

Uses dashboard_elements

Looks per folder

SELECT folder_path, count(*) AS looks, sum(view_count) AS views
FROM looker.main.looks
GROUP BY ALL
ORDER BY views DESC

Uses looks

39 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • Which three Looker dashboards have the most views?
  • List the titles of dashboards in the /Shared/Marketing folder.
  • How many dashboard tiles query each explore?
  • Which Looks are public?
  • Which Looker users are disabled? Give their emails.
  • Which users hold the Admin role?

Looker is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.