LAMS is a style guide and linter for Looker's LookML data modeling language. It is designed to help a team of developers to produce more maintainable LookML projects.
- The style guide alone can help your project, even without enforcement by the linter.
- The linter can be configured to enforce rules from the style guide for all commits to your master branch.
- The linter also allows you to conveniently specify custom rules to enforce.
- In addition to enforcing rules, the linter also produces markdown files to help developers navigate the project.
Interested? See a video of LAMS in action!
To use LAMS with the least overhead for simple interactive local use and testing:
cd <directory where you keep your projects>
git clone https://github.com/looker-open-source/look-at-me-sideways.git
cd look-at-me-sideways
npm install
cd ..
git clone <your-lookml-repo-url>
cd <your-lookml-repo>
node ../look-at-me-sideways
(We will be publishing LAMS to NPM shortly after its release to simplify the above)
Although LAMS can be deployed manually using your CI tool of choice, we have provided a Docker image to simplify the deployment. Documentation can be found here.
If your LookML project doesn't have a manifest.lkml file, you may want to consider adding one! By specifying a 'project_name' in your manifest, LAMS will be able to generate the correct links back to your project files in your instance.
As of the current release, the Linter enforces rules K1-4, F1-4, E1-2, and T1-10.
It currently does not resolve extends references, so if you are complying with a rule via extension, use a rule exemption as noted below.
One of the best practices required by the style guide is that whenever a rule is not followed, the reason should be documented in a LookML comment. In fact, the linter accepts a specific format for these exemption reasons to allow them to be checked:
view: rollup {
derived_table: {
sql_trigger_value: SELECT CURRENT_DATE() ;;
# LAMS
# rule_exemptions: {
# T1: "2018-11-12 - I can't use datagroups for this super special reason and Bob said it's ok"
# }
sql: SELECT ...If you want to entirely opt-out of checking a particular rule, you can specify the exemptions in your project's manifest.lkml file.
Note: For large projects with many exemptions, we suggest starting the reasons with the Y-M-D formatted date on which they were added, for easier review in your issue report.
One of the primary ways that LAMS gives developers feedback, in addition to passing/failing pull requests, is by adding its findings to markdown files in your project. Here is an example of a resulting markdown file as displayed in Looker:
In addition to linting against the rules from the style guide, LAMS also has experimental support for calling custom rules:
# in your manifest.lkml
project_name: "my_project"
# LAMS
# custom_rules: [
# "https://path/to/your/script.js"
# ]See here for an example implementation of a custom rule script.
LAMS respects user privacy. See PRIVACY.md for details.
LAMS is Copyright (c) 2018 Looker Data Sciences, Inc. and is licensed under the MIT License. See LICENSE.txt for license details.
LAMS is NOT officially supported by Looker. Please do not contact Looker support for issues with LAMS. Issues may be reported via https://github.com/looker-open-source/look-at-me-sideways/issues , but no SLA or warranty exists that they will be resolved.
LAMS has primarily been developed by Joseph Axisa and Fabio Beltramini. See all contributors
Bug reports and pull requests are welcome on GitHub at https://github.com/looker-open-source/look-at-me-sideways.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributer Covenant Code of Conduct. Concerns or incidents may be reported confidentially to fabio@looker.com.
>_>


