Przejdź do treści
Biblioteka skilli
Dane i analityka · Budowanie i kod

lookml-view

/lookml-view

Tworzy i zmienia widoki LookML: podstawowe definicje, sql_table_name, organizację plików i wzorce.

Repozytorium
looker-skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
15.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 15.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

Co robi i kiedy

Tworzy i zmienia widoki LookML: podstawowe definicje, sql_table_name, organizację plików i wzorce.

Oryginalny opis (EN)

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

Jak działa

  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
Sekcje z nagłówków SKILL.md, w oryginale · 90 linii, 361 słów
Podgląd SKILL.md
---
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.
Pliki w paczce (2)
  • SKILL.md 3 KB
  • references/derived_table.md 6 KB

Wersje

W bazie nie ma innych skilli o nazwie lookml-view.

Migawka bazy z 13.11.2026 · wersja paczki dddb13948ecb (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100lookml-explore
    Tworzy i zmienia Explore w LookML: definicję Explore, joiny, grupy dostępu i podstawową konfigurację.
  • 100lookml-model
    Tworzy i zmienia pliki modelu LookML (.model.lkml): definiuje połączenia, includes i ustawienia na poziomie modelu.
  • 100looker-expert
    Wspiera pracę z Looker BI i LookML: eksploracje, wymiary, miary, dashboardy, trwałe tabele pochodne, łączenia i modelowanie danych.
  • 100droughty
    Obsługuje zestaw Droughty do introspekcji schematów: konfiguracja profilu i projektu, generowanie LookML z hurtowni, testy dbt, diagramy DBML, dokumentacja pól i raporty jakości danych.
  • 100modeler
    Buduje, waliduje i zarządza modelami semantycznymi w Sidemantic: warstwa semantyczna, metryki i wymiary, modele ze schematu bazy lub zapytań SQL oraz import z Cube, dbt i LookML, głównie przez CLI i YAML.
  • 100semantic-layer-bootstrap
    Tworzy lub porządkuje warstwę semantyczną Motley z surowej bazy, metadanych BI, dbt, LookML lub Cube, a także z pytań.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.