Skip to content

Adding dashboard support to PyDABs - #6518

Open
hejcman-enverus wants to merge 4 commits into
databricks:mainfrom
hejcman-enverus:pydabs-dashboards-support
Open

Adding dashboard support to PyDABs#6518
hejcman-enverus wants to merge 4 commits into
databricks:mainfrom
hejcman-enverus:pydabs-dashboards-support

Conversation

@hejcman-enverus

@hejcman-enverus hejcman-enverus commented Sep 3, 2026

Copy link
Copy Markdown

Changes

  • Added PyDABs support for dashboard resources.
  • Added the generated Dashboard models and exposed:
    • Resources.add_dashboard
    • Resources.dashboards
    • dashboard_mutator
  • Added codegen support for schema interface{} fields as Python Any, enabling both inline and file-backed serialized_dashboard values.
  • Added a changelog fragment.

Example Usage

from dataclasses import replace

from databricks.bundles.core import Resources, dashboard_mutator
from databricks.bundles.dashboards import Dashboard


def load_resources() -> Resources:
    resources = Resources()
    resources.add_dashboard(
        "sales_dashboard",
        Dashboard(
            display_name="Sales Dashboard",
            serialized_dashboard={"pages": []},
            warehouse_id="0123456789abcdef",
        ),
    )
    return resources


@dashboard_mutator
def configure_dashboard(dashboard: Dashboard) -> Dashboard:
    return replace(dashboard, embed_credentials=True)

Why

Dashboards are supported as bundle resources by the Databricks CLI, but they did not have an equivalent PyDABs API like jobs, schemas, volumes, and other resources.

Dashboard definitions also require support for serialized_dashboard, whose schema permits both serialized strings and structured JSON values. Mapping the underlying interface{} type to Any preserves both representations.

Tests

  • All relevant PyDABs checks in the taskfile
  • Added an acceptance test covering:
    • A YAML-defined, file-backed dashboard
    • A Python-defined dashboard with inline structured JSON
    • Dashboard mutators
    • Direct and Terraform bundle engines
    • Supported DMS configurations

@hejcman-enverus
hejcman-enverus marked this pull request as ready for review September 3, 2026 13:33
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

8 files changed
Suggested: @denik
Also eligible: @andrewnester, @anton-107, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

General files (require maintainer)

16 files changed
Based on git history:

  • @denik -- recent work in python/databricks/bundles/core/, python/codegen/codegen/, python/codegen/codegen_tests/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

@hejcman-enverus hejcman-enverus changed the title Add dashboard support to PyDABs Adding dashboard support to PyDABs Sep 3, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6518
  • Commit SHA: 9e03865f67260e1a0cb9ae4a40faf4b5ea70a7bf

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant