lookml-model

Used when creating or modifying LookML model files (.model.lkml), including defining connections, include files, and configuring model-level settings.

Last repository push
GitHub Stars
212
Forks
664
Issues / PRs
21

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lookml-model" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2273a8e4e939a16472d882c88de2ef351d2d5dae4f770ebfe1a5a14c6c3aeb09. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Used when creating or modifying LookML model files (.model.lkml), including defining connections, include files, and configuring model-level settings.

0 Downloads

Introduction source: third_party · Kilo-Org · 0.0.1 Reference

SkillPi interpretation

Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: lookml-model
description: >-
  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.
metadata:
  category: data
  source:
    repository: 'https://github.com/looker-open-source/looker-skills'
    path: skills/lookml-model
    license_path: LICENSE
    commit: c530d1b7efee1db49851a04563ce946adfd191a8

Instructions

  1. Define the Model File: A model file generally corresponds to a single database connection and includes Explores.
  2. Required Parameters:
    • connection: "connection_name": Must match a connection defined in Looker Admin.
    • include: "pattern": Specifies which view and dashboard files are available to the model.
  3. Best Practices:
    • Includes: Avoid include: "*.view" if possible to prevent performance issues and namespace clutter. Use specific paths or wildcards like include: "/views/users.view" or include: "/views/marketing/*.view".
    • Label: Use label: to provide a user-friendly name for the model in the UI.
    • Week Start Day: Set week_start_day: if the business logic requires a specific start day (e.g., monday).
    • Datagroups & Caching: ALWAYS use datagroups for caching policies to align Looker with your ETL/ELT processes.

4. Datagroups & Caching

Datagroups are the preferred mechanism for managing caching policies.

  • Definition: Define in the model file.
  • sql_trigger: A query that returns a single value (e.g., max timestamp). If the value changes, the cache is invalidated.
  • max_cache_age: A fallback duration if the trigger doesn't change.
  • persist_with: Apply the datagroup to Explores or the entire model.

Datagroups vs persist_for

Feature Datagroups (Recommended) persist_for
Trigger SQL Query (Smart) Fixed Time (Dumb)
Alignment Aligns with ETL/ELT completion Misaligned (guesswork)
Management Centralized in Model file Scattered in Explores/Models
Use Case Production dashboards, ETL synchronization Ad-hoc queries, Real-time (<1h) needs

[!TIP] Use persist_for ONLY for real-time dashboards where you need to force a cache refresh every X minutes (e.g., stock tickers, fast-moving inventory). For everything else, use Datagroups.

5. Include Patterns

Use strict patterns to control scope and performance.

Pattern Description Use Case
include: "/views/*.view" All views in specific folder Standard modularity
include: "/views/marketing/users.view" Specific file Precise control, avoids conflicts
include: "/**/*.view" Recursive (all views in project) Avoid unless small project
include: "/dashboards/*.dashboard" All dashboards in folder Importing dashboards

Examples

Basic Model

connection: "thelook"

# Include all views in the views/ folder
include: "/views/*.view"

# Include all dashboards
include: "/*.dashboard"

# Define an Explore (usually better to define in separate files for large projects, but acceptable here for small ones)
explore: orders {
  join: users {
    type: left_outer
    sql_on: ${orders.user_id} = ${users.id} ;;
    relationship: many_to_one
  }
}

Model with Specific Settings


connection: "snowlooker"

label: "eCommerce Analytics"

# Set valid week start day
week_start_day: monday

# Include specific folders
include: "/views/finance/*.view"
include: "/views/marketing/*.view"

## Model with Datagroup (Best Practice)

```lookml
connection: "thelook"

# Define the caching policy
datagroup: ecommerce_etl {
  description: "Triggers when the max created_at date changes in the events table."
  sql_trigger: SELECT MAX(created_at) FROM `project.dataset.events` ;;
  max_cache_age: "24 hours" # Fallback
}

# Apply default caching to all Explores in this model
persist_with: ecommerce_etl

include: "/views/*.view"

explore: orders {
  # This explore inherits 'persist_with: ecommerce_etl' from the model default
}

explore: real_time_dashboard {
  # Override with a different policy if needed
  persist_for: "5 minutes"
}
```

Version history

  1. skills-20261103210927-6c1b454 GitHub ↗
    Original release notes

    Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323

  2. skills-20260928190452-ff51758 GitHub ↗
    Original release notes

    Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505

  3. skills-20260924105536-d31110d GitHub ↗
    Original release notes

    Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049

  4. skills-20260923085113-cea285e GitHub ↗
    Original release notes

    Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7

  5. skills-20260922193956-97d7333 GitHub ↗
    Original release notes

    Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 面向数据分析师/工程师的明确刚需场景
  • 提供完整最佳实践和端到端示例
  • 涵盖 LookML 模型文件创建/修改全流程
Trigger Precision95/100

Highlights

  • 触发词精准限定于 LookML 模型文件操作
  • 覆盖创建/修改、连接定义等核心场景
  • 边界清晰无歧义
Structure and Standards95/100

Highlights

  • Instructions 分步骤清晰说明
  • 含多个完整端到端示例
  • frontmatter 完整且单文件长度合规
Execution Reliability90/100

Highlights

  • 工具来源明确(GitHub 官方仓库)
  • 参数说明准确且覆盖主要异常场景
  • 提供 Datagroups vs persist_for 的可靠选择指南
Evidence Verifiability (mean of the first four)93/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.