databricks-widget-pivot

Build and validate pivot widget JSON structures for Lakeview dashboards.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/bspt628/databricks-lakeview-skills --skill databricks-widget-pivot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-widget-pivot
Source: https://github.com/bspt628/databricks-lakeview-skills/tree/main/widget-pivot
Command: npx skills add https://github.com/bspt628/databricks-lakeview-skills --skill databricks-widget-pivot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pivot widgets in Databricks Lakeview dashboards often require complex JSON structures to define rows, columns, and cells. This Skill provides comprehensive guidance and templates to build correct pivot JSON and ensure consistent behavior.

Core Features & Use Cases

  • Complete JSON reference for pivot widgets, including fields, cubeGroupingSets, encodings, and cell formatting
  • Templates and rules for color scales, custom sorts, and multi-cell values
  • Use cases: create dashboards with multi-dimensional analysis (e.g., region × time) and ensure reliable rendering across datasets

Quick Start

Copy and adapt a ready-to-use pivot JSON template to your dataset and deploy to Lakeview.

Frequently Asked Questions about databricks-widget-pivot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build pivot widget JSON structures for Databricks Lakeview dashboards?

To build pivot widget JSON for Lakeview dashboards, you copy a ready-to-use template and adapt it to your dataset. This enforces strict schema rules, including spec.version 3, ensuring proper row and column encodings for reliable rendering.

What are cubeGroupingSets in pivot widgets and when do I need them?

CubeGroupingSets in pivot widgets define multi-dimensional data groupings for your dashboard cells. You need them when creating dashboards that require multi-dimensional analysis, such as region by time matrices, to ensure data aggregates correctly.

How do I apply color-scale formatting to pivot widget encodings?

You apply color-scale formatting by defining rules within your pivot widget JSON encodings. This provides templates and rules for color scales, ensuring consistent cell formatting and visual data representation across your dashboards.

Why does my pivot widget fail to render when fieldName mappings are misaligned?

Pivot widgets fail to render due to misaligned fieldName mappings because strict schema rules require consistent alignment between query fields and encodings. Enforcing this mapping ensures the widget operates reliably across datasets.

Can I display disaggregated data in a Lakeview pivot widget?

Yes, you can display disaggregated data in a Lakeview pivot widget by configuring the JSON structure accordingly. The schema supports disaggregated data alongside cubeGroupingSets, allowing flexible multi-dimensional analysis without forced aggregation.

What is the best way to validate pivot widget JSON before deploying to Lakeview?

The best way to validate pivot widget JSON is to check it against strict schema rules, ensuring spec.version 3 and field alignment between query and encodings. This validation process ensures reliable operation before deploying to your Lakeview dashboards.