一键导入
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 职业分类
Design and implementation of high-quality Looker dashboards using LookML. Covers layout optimization, KPI comparisons, mixed series charts, advanced markdown styling, and performance best practices.
Use this skill to create Access Grants for row-level or object-level security.
Overview of LookML field types (Dimension, Measure, Filter, Parameter) and the role of the `sql` parameter in each. Use this skill to choose the right field type for your data modeling needs.
Use this skill to use Liquid variables in LookML for dynamic SQL, HTML, and Links, including advanced patterns for query optimization.
Use this skill when you need to create or modify a LookML Model file (.model.lkml). This includes defining connections, includes, and configuring model-level settings.
Deep dive into LookML includes, refinements (layering), and project structure best practices. Essential for mastering Looker's object-oriented capabilities.
| 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. |
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.