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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keystones_lookml-0.0.1.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keystones_lookml-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / keystones_lookml-0.0.1.tar.gz
| Download URL | keystones_lookml-0.0.1.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f61a39350676d91e4f25676d6137c6b711ebb8454bc9bc8593ca7e0a38cdb7b
|
|
BLAKE2b-256 checksum How to use checksums |
8eda6a5cb5e6bc22b2ff8f1b684ea0f70c7d5c4034aa2d01b9978a069420dcee
|
| 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.1-py3-none-any.whl
| Download URL | keystones_lookml-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4481e8d79ab6a327464294aed673f69c0b3e0ae63c5469171b0f5b54f43d449
|
|
BLAKE2b-256 checksum How to use checksums |
e35d1da0ca45d3b792193657d59be0ea818eeda4370a63d0d9caab6f275af163
|
| 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}
|