New advertisers: 50% off your first month with code FIRSTMONTHSee slots
1yangsh avatar

metricview-lint

1yangsh/metricview-lint

Offline linter for Unity Catalog metric view YAML, checking definitions without any workspace access.

tools
3
transport
STDIO
last updated
Nov 21, 2026
View on GitHub

What it does

  • Validates definitions with lint_metric_view for YAML or full CREATE VIEW ... WITH METRICS statements, and lint_metric_view_file for files on disk
  • Reports against the full rule set via list_rules, covering syntax, joins, measures, window specs, formats, and materialization
  • Runs locally with no Databricks connection or credentials, so checks finish in milliseconds
  • Designed for catching mistakes before deployment, in editors, CI, or while a coding agent writes metric views

Tools

3 tools

Public tool metadata for what this MCP can expose to an agent.

lint_metric_viewValidates a metric view definition given as YAML or a full CREATE VIEW ... WITH METRICS statement and returns the diagnostics.

Validates a metric view definition given as YAML or a full CREATE VIEW ... WITH METRICS statement and returns the diagnostics.

No parameter schema in public metadata yet.

lint_metric_view_fileLints a metric view file on disk.

Lints a metric view file on disk.

No parameter schema in public metadata yet.

list_rulesReturns every rule with its code, severity and summary.

Returns every rule with its code, severity and summary.

No parameter schema in public metadata yet.

Readme

metricview-lint

Catch mistakes in Databricks Unity Catalog metric view definitions before you deploy them, in your editor, in CI, or while a coding agent like Claude Code writes them.

$ metricview-lint examples/invalid
examples/invalid/common-mistakes.yaml:8: error MV406 join 'customer' 'on' compares customer_id = customer_id; unqualified columns resolve to the joined table, so this is always true. Write source.customer_id = customer.customer_id or use 'using: [customer_id]'
examples/invalid/common-mistakes.yaml:20: error MV302 measure 'margin' has no aggregate function (SUM, COUNT, AVG, MEASURE, ...); a non-aggregated expression belongs in 'fields'.
examples/invalid/common-mistakes.yaml:22: error MV305 MEASURE(orders) references a measure defined later; move 'orders' above 'aov'
examples/invalid/common-mistakes.yaml:31: error MV502 measure 'revenue_7d': invalid range 'last 7 days'; expected current, cumulative, all, or 'trailing|leading <n> [day|month|year] [inclusive|exclusive]'
...

View the full README on GitHub

Details

Repository
github.com/1yangsh/metricview-lint
Categories
Data & Analytics, Databases, Developer Tools
Package
metricview-lint
Transport
STDIO
Registry
MCP registry, active

Similar to metricview-lint

More Data & Analytics