LookML Validator
Usage
spectacles lookml
[-h]
[GLOBAL_FLAGS ...]
--project PROJECT
[--branch BRANCH]
[--remote-reset | --commit-ref COMMIT_REF]
[--severity {info,warning,error}]
Options
All required options in Global Flags are also required for the SQL Validator.
branch
Usage: --branch dev-branch-abc123
The Git branch of your Looker project to validate.
If neither branch
nor commit-ref
are passed, Spectacles will test production.
Environment Variable: LOOKER_GIT_BRANCH
commit-ref
Usage: --commit-ref ae4d8c
The commit of your project that Spectacles should checkout to validate. Spectacles will create a temporary branch for the tests based on this commit and delete the branch at the end of the validation or if an exception is handled.
If neither branch
nor commit-ref
are passed, Spectacles will test production.
Environment Variable: SPECTACLES_COMMIT_REF
pin-imports
Usage: --pin-imports core_looker_project:ae4d8c
Pins locally imported Looker projects to a specific git ref. By default, Spectacles will set any locally imported Looker projects, defined in your manifest.lkml
, to their current production commit. If you want to test a project with a specific commit or branch from the upstream imported project, you can use this flag to do so.
project
Required. Usage: --project ecommerce
The LookML project you want to validate. Projects are listed at the bottom of the Develop menu in Looker.
Environment Variable: LOOKER_PROJECT
severity
Usage: --severity error
The issue severity threshold for the validation result. Looker returns syntax issues at three levels of severity: info, warning, and error. Spectacles will always display all issues returned by Looker, regardless of severity.
However, you may want to relax the validator so it doesn't fail (zero exit code) if only warnings are returned. Alternatively, you may want to make the validator more strict so it fails (non-zero exit code) even if info-level issues are returned.
The value provided to this argument is the minimum severity level required for the validator to fail. For example, if all warnings are returned, --severity warning
would cause a validation failure but --severity error
would not.
The default severity threshold is warning
.
remote-reset
Usage: --remote-reset
Reset the branch to the version of the branch that is on the remote repository. This flag cannot be used with --commit-ref
because it implicitly specifies a commit to use.
Providing this flag will delete any uncommited changes in the user’s workspace.
Environment Variable: SPECTACLES_REMOTE_RESET