Skip to main content

keystones-lookml

Gate a LookML view, explore or field on what it means, not on its labels.

A keystones keystone pins a review gate to an AST node. LookML has no tree-sitter grammar, and its description and label parameters churn constantly, so a text region trips on every wording change. This parser plugin reads LookML with lkml and drops those parameters from the hash.

Install

pip install keystones-lookml
[[tool.keystones.language]]
extensions = [".lkml"]
parser = "keystones_lookml.parsers:lookml"

.lkml matches orders.view.lkml and orders.model.lkml by suffix. To drop other parameters as well, or fewer:

parser = { plugin = "keystones_lookml.parsers:lookml", drop = ["label", "description", "group_label"] }

The drop list is part of the hasher, so changing it is a keystones migrate rather than drift.

What a keystone covers

Every block is a definition, named by type and label under its parents:

view: orders {
  # keystone(bi): total-spend
  measure: total {
    type: sum
    sql: ${TABLE}.amount ;;
    label: "Total"
  }
}

That keystone is orders.view.lkml::view.orders.measure.total. A marker above view: orders { covers the whole view; keystone(file) covers the file. Explores and joins work the same way: explore.orders.join.users.

What counts as a change

Edit Result
sql, type, filters, any parameter not dropped C3, the owner reviews
description or label nothing
reordering parameters inside a block nothing
whitespace inside a sql expression nothing
reordering items in a list such as filters C3, lists are ordered
a comment line inside the block C4, fix clears it with no note

License

MIT

Metadata

Release files for keystones-lookml 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keystones-lookml 0.0.2
File Size Uploaded
keystones_lookml-0.0.2.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for keystones-lookml 0.0.2
File Interpreter ABI Platform
keystones_lookml-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / keystones_lookml-0.0.2.tar.gz

Download URL keystones_lookml-0.0.2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a91a32899fb416e3b83a1b51d080d3429a8cc8c588ed41f2fd7a06cefab45193
BLAKE2b-256 checksum
How to use checksums
836a84d2a2c5521e7ee4b6cc6473aa44a01efce78801341710fbe4d6eeedba38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / keystones_lookml-0.0.2-py3-none-any.whl

Download URL keystones_lookml-0.0.2-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd1929e941ba8966590342900cd02d3e9b7ea5d024c86023b6f17343228866ae
BLAKE2b-256 checksum
How to use checksums
a942ccbc26dace695b44f10bcfeb4929e071108bb4eaaaf2acd794d712469973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page