Skip to content
Skills Library
Data & analytics · Building & coding

lookml-view

/lookml-view

Use this skill to create or modify LookML Views. Covers basic view definitions, sql_table_name, file organization, and patterns.

Licence
Apache-2.0
Last repository change
15.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 15.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use this skill to create or modify LookML Views. Covers basic view definitions, sql_table_name, file organization, and patterns.

Original author description

Use this skill to create or modify LookML Views. Covers basic view definitions, sql_table_name, file organization, and patterns.

How it works

  1. 1. File Organization
  2. 2. Core Standards
  3. 3. Best Practices
  4. 4. Related Skills
  5. Basic View
  6. Extended View
  7. Refinement (Layering)
  8. Reference Skills
Original SKILL.md headings · 90 lines, 361 words
SKILL.md preview
---
name: lookml-view
description: Use this skill to create or modify LookML Views. Covers basic view definitions, sql_table_name, file organization, and patterns.
license: Apache-2.0
metadata:
  publisher: google
  version: v1
---

# Instructions

## 1. File Organization

-   **Standard Views**: `views/[datasource_name]/[view_name].view.lkml`
-   **Extended Views**: `views/[datasource_name]/[view_name]_ext.view.lkml`
-   **Refinements**: `views/[datasource_name]/[view_name]_rfn.view.lkml`
-   **NDTs**: `views/[datasource_name]/[view_name]_ndt.view.lkml`
-   **SDTs**: `views/[datasource_name]/[view_name]_sdt.view.lkml`

## 2. Core Standards

1.  **sql_table_name**: **Required** for standard views. Defaults are fragile; be explicit.
2.  **Primary Key**:
    -   **Convention**: place the primary key as the first dimension for readability.
    -   Must have `primary_key: yes` —   **Why**: essential for [symmetric aggregates](https://cloud.google.com/looker/docs/symmetric-aggregates), which Looker uses to handle JOIN row duplication correctly (prevents fanout in multi-join queries).
3.  **Refinements**: Use `+` before the view name (e.g., `view: +users`) to refine existing views without modifying the original file.
4.  **Extensions**: Use `extends` to reuse logic from other views.
5.  **Derived Tables**: **Evaluate and nudge towards Native Derived Tables (NDTs)** (`explore_source`) over SQL Derived Tables (`sql`) where possible. When creating entity rollups or summary facts (e.g., `user_order_facts`), assess whether an existing Explore can source the data. NDTs are recommended because they minimize code drift and automatically inherit underlying LookML descriptions, formatting, and Row-Level Security (RLS). If an NDT is too complex, or if specific SQL features are required, an SDT is fully acceptable.

## 3. Best Practices

-   **Naming**: Use `snake_case` for view names and filenames.
-   **Descriptions**: Add descriptions to the view itself if it helps explain its purpose (e.g., "Daily active users aggregated by region").
-   **Output Format**: Ensure the file ends with a newline.

## 4. Related Skills

-   **[lookml-refinements](../lookml-refinements/SKILL.md)**: Logic for `include`, refinements (`+`), and Hub & Spoke patterns.

# Examples

## Basic View

```lookml
view: users {
  sql_table_name: `project.dataset.users` ;;

  dimension: user_id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
    group_label: "IDs"
    description: "Unique internal user ID."
  }

  dimension: email {
    type: string
    sql: ${TABLE}.email ;;
    description: "User's email address."
  }
}
```

## Extended View

```lookml
include: "/views/base/users.view"

view: users_extended {
  extends: [users]

  dimension: lifetime_value {
    type: number
    sql: ${TABLE}.ltv ;;
    description: "Total lifetime value of the user."
  }
}
```

## Refinement (Layering)

```lookml
include: "/views/users.view"

view: +users {
  label: "All Users (Refined)"
  
  dimension: email {
    # Adding a description to an existing field
    description: "Primary contact email."
  }
}
```

## Reference Skills

- [Derived Tables](references/derived_table.md): Standard (SDT) and Native (NDT) derived table patterns/materialization.
Files in this package (2)
  • SKILL.md 3 KB
  • references/derived_table.md 6 KB

Versions

The database has no other skills named lookml-view.

Database snapshot: 13.11.2026 · package version dddb13948ecb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100lookml-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.
  • 100lookml-model
    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.
  • 100looker-expert
    Expert-level Looker BI, LookML, explores, dimensions, measures, dashboards, and data modeling. Use when the user mentions LookML, BI, analytics, dashboards, or data modeling, or when the task involves LookML Basics, Advanced Dimensions and Measures, Persistent Derived Tables, or Explores and Joins.
  • 100droughty
    Droughty schema-introspection toolkit — use when working with Droughty commands, profile/project configuration, LookML generation from warehouse schemas, dbt test generation, DBML diagrams, field documentation, or data quality reports
  • 100modeler
    Build, validate, and manage semantic models using Sidemantic. Use when asked to create a semantic layer, define metrics/dimensions, model a database schema, generate models from SQL queries, import from Cube/dbt/LookML, or set up analytics definitions. Prioritizes CLI-first…
  • 100semantic-layer-bootstrap
    Bootstrap or curate a Motley semantic layer from any starting point — a raw auto-ingested database, existing BI/dbt/LookML/Cube metadata, docs, or just questions in the user's head. Use when the user asks to "set up", "bootstrap", or "curate" the semantic layer, or when the…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.