skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
looker-open-source/looker-skills128 installs

lookml-sets

Guide to using LookML sets for grouping fields, controlling visibility, and managing drill paths.

How do I install this agent skill?

npx skills add https://github.com/looker-open-source/looker-skills --skill lookml-sets
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    No security issues detected. This skill is a purely educational guide for LookML development.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

LookML Sets

Sets are reusable lists of fields (dimensions, measures, and filters) defined within a view or a model. They are primarily used to group fields together for various purposes such as drill-down paths, explore field visibility, and more.

Syntax

set: set_name {
  fields: [field_name1, field_name2, view_name.field_name3, ...]
}

Key Features

  • Reusability: Define a list of fields once and use it in multiple places.
  • Composition:
    • Include All: [set_name*] includes all fields from another set.
    • Exclude: [-field_name] excludes a specific field.
    • External Reference: view_name.set_name* refers to a set in another view (ensure views are joined).

Use Cases

1. Drill Fields (Primary Use Case)

Sets are the standard way to define what happens when a user clicks on a measure value. Instead of listing fields repeatedly, define a set and reference it.

view: orders {
  # ... dimensions ...

  set: order_details {
    fields: [id, created_date, status, user.email]
  }

  measure: count {
    type: count
    drill_fields: [order_details*]
  }
}

2. Controlling Explore Visibility (Field Picker)

You can use sets at the Explore level to explicitly define which fields are visible to users. This is best practice for curating Explores.

explore: orders {
  fields: [ALL_FIELDS*]         # Start with everything (default)
  # OR
  fields: [orders.order_details*, users.user_info*] # Allowlist specific sets
}

3. Excluding Fields

Use sets to exclude specific fields from an Explore without hiding them at the view level (which hides them globally).

explore: orders {
  fields: [ALL_FIELDS*, -users.password_hash]
}

Best Practices

1. The detail Set

Every view should ideally have a default set (commonly named detail or drill_set) that includes the most relevant fields for drilling into a record from that view.

view: users {
  dimension: id { primary_key: yes ... }
  dimension: name { ... }
  dimension: email { ... }

  # Standard set for drilling
  set: detail {
    fields: [id, name, email]
  }
}

2. Naming Conventions

  • Use snake_case for set names.
  • Use descriptive names like user_info, financial_metrics, drill_detail.

3. Avoid Cross-View Dependencies in View Sets

While you can reference other_view.field in a view's set, this creates a dependency. Ensure that other_view is always joined whenever the set is used.

  • Better: Define sets local to the view (only its own fields).
  • Explore Level: Combine sets from different views at the Explore level (e.g., fields: [orders.detail*, users.detail*]).

4. Cumulative Sets

You can build sets on top of other sets.

set: basic_info {
  fields: [id, name]
}

set: extended_info {
  fields: [basic_info*, email, created_date]
}

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/looker-open-source/looker-skills/lookml-sets">View lookml-sets on skillZs</a>