一键导入
lookml-explore
Use this skill when you need to create or modify a LookML Explore. This includes defining the Explore, joins, access grants, and basic configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill when you need to create or modify a LookML Explore. This includes defining the Explore, joins, access grants, and basic configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Looker Developer Onboarding: Step 3. Authenticates the Looker CLI using OAuth. Only execute this after Step 2 (CLI Verification using `installing-looker-cli`).
Looker Developer Onboarding: Step 4. Creates a database connection in Looker to Google BigQuery. Only execute this after Step 3 (CLI Authentication using `authenticating-looker-cli`).
Looker Developer Onboarding: Step 7 (Final Step). Creates a LookML dashboard in the project, imports it as a user-defined dashboard (UDD) in Looker, and iteratively refines it based on user feedback by syncing changes. Only execute this after Step 6 (Model Setup using `creating-lookml-model`).
Looker Developer Onboarding: Step 6. Creates LookML views and models based on the user's goals, maps model connections, validates LookML, and runs verification queries. Only execute this after Step 5 (Project Setup using `setting-up-looker-project`).
Looker Developer Onboarding: Step 1. Guides the agent to explore BigQuery data and define the onboarding goal. This is the first active step, to be executed immediately after reading the parent orchestrator `looker-developer-onboarding`.
Looker Developer Onboarding: Step 2. Verifies that the Looker CLI is available in the PATH, or installs it from GitHub Releases if missing. Only execute this after Step 1 (Data Discovery using `exploring-data-for-looker`).
| name | lookml-explore |
| description | Use this skill when you need to create or modify a LookML Explore. This includes defining the Explore, joins, access grants, and basic configuration. |
| license | Apache-2.0 |
| metadata | {"publisher":"google","version":"v1"} |
snake_case for the Explore name.description: 100% Coverage. Every Explore MUST have a description.label: A user-friendly name for the Explore in the UI.view_name: Defaults to explore name, but explicit definition is safer.relationship: Required (one_to_one, many_to_one).sql_on: Required. Use ${left.id} = ${right.id} syntax.type: defaults to left_outer. Use inner or full_outer explicitly if needed.from to rename views just for aesthetics. Use view_label instead.always_filter: specific filters that users can change but cannot remove.sql_always_where: specific restrictions that users cannot change.persist_with: Link explore cache to datagroups (e.g., default_datagroup).fields: Use inclusive lists to strictly control content when necessary (ALL_FIELDS*, -view.field).Aggregate Tables (Aggregate Awareness) allow Looker to query smaller, pre-aggregated tables instead of the raw granular data, drastically improving query performance.
explore: orders {
aggregate_table: rollup_name {
query: {
dimensions: [created_date, status]
measures: [total_revenue, count]
filters: [orders.created_date: "6 months"]
}
materialization: {
datagroup_trigger: ecommerce_etl
# partition_keys: ["created_date"] # BigQuery/Presto optimization
# increment_key: "created_date" # Incremental builds
# increment_offset: 3 # Rebuild last 3 periods
}
}
}
Query: Defines the "shape" of the rollup.
Materialization:
Best Practices:
date). Looker can roll up date to month or year automatically.dimensions list.extends: [base_explore] to inherit joins, fields, and descriptions from another explore.
orders -> marketing_orders).explore: orders {
label: "Orders"
description: "Analyze order data, including user and product details."
view_name: orders
join: users {
relationship: many_to_one
sql_on: ${orders.user_id} = ${users.id} ;;
}
}
explore: events {
label: "Web Events"
description: "User interaction events."
persist_with: default_datagroup
# Users can change this filter, but it defaults to '7 days'
always_filter: {
filters: [events.created_date: "7 days"]
}
# Users CANNOT change this filter.
sql_always_where: ${events.is_test_data} = false ;;
join: sessions {
relationship: many_to_one
sql_on: ${events.session_id} = ${sessions.session_id} ;;
}
}
## Aggregate Table (Advanced)
```lookml
explore: orders {
aggregate_table: monthly_sales_summary {
query: {
dimensions: [created_month, status, products.category]
measures: [total_revenue, count]
filters: [orders.created_date: "2 years"]
}
materialization: {
datagroup_trigger: ecommerce_etl
partition_keys: ["created_month"]
increment_key: "created_month"
increment_offset: 1 # Rebuild current and previous month
}
}
}
explore: orders_extended {
extends: [orders]
label: "Orders (Marketing View)"
view_name: orders
# Add new joins specific to this view
join: marketing_channels {
sql_on: ${orders.channel_id} = ${marketing_channels.id} ;;
relationship: many_to_one
}
}
## Reference Skills
For more complex scenarios, refer to these specialized skills:
- [Advanced Explore Configuration](references/advanced.md): UNNESTing, lateral flattens, and row-level security.
- [Joins Deep Dive](references/joins.md): Detailed join types, relationships, and aliasing.