Share via


lakeview command group

Note

This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

The lakeview command group within the Databricks CLI contains commands for specific management operations for Lakeview dashboards. See Dashboards.

databricks lakeview create

Create a draft dashboard.

databricks lakeview create [flags]

Options

--display-name string

    The display name of the dashboard.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--serialized-dashboard string

    The contents of the dashboard in serialized string form.

--warehouse-id string

    The warehouse ID used to run the dashboard.

Global flags

Examples

The following example creates a new dashboard with a display name:

databricks lakeview create --display-name "Sales Dashboard" --warehouse-id "abc123"

The following example creates a dashboard with JSON configuration:

databricks lakeview create --json '{"display_name": "Revenue Report", "warehouse_id": "xyz789"}'

databricks lakeview create-schedule

Create a schedule for a dashboard.

databricks lakeview create-schedule DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the schedule belongs.

Options

--display-name string

    The display name for schedule.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--pause-status SchedulePauseStatus

    The status indicates whether this schedule is paused or not. Supported values: PAUSED, UNPAUSED

--warehouse-id string

    The warehouse id to run the dashboard with for the schedule.

Global flags

Examples

The following example creates a dashboard schedule:

databricks lakeview create-schedule abc123 --display-name "Daily Sales Report" --warehouse-id "wh456"

The following example creates a paused schedule:

databricks lakeview create-schedule abc123 --display-name "Weekly Report" --pause-status PAUSED --warehouse-id "wh456"

databricks lakeview create-subscription

Create a subscription for a dashboard schedule.

databricks lakeview create-subscription DASHBOARD_ID SCHEDULE_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the subscription belongs.

SCHEDULE_ID

    UUID identifying the schedule to which the subscription belongs.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

Global flags

Examples

The following example creates a subscription for a schedule:

databricks lakeview create-subscription abc123 sch456 --json '{"email": "someone@example.com"}'

databricks lakeview delete-schedule

Delete a schedule for a dashboard.

databricks lakeview delete-schedule DASHBOARD_ID SCHEDULE_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the schedule belongs.

SCHEDULE_ID

    UUID identifying the schedule.

Options

--etag string

    The etag for the schedule.

Global flags

Examples

The following example deletes a dashboard schedule:

databricks lakeview delete-schedule abc123 sch456

The following example deletes a schedule with etag:

databricks lakeview delete-schedule abc123 sch456 --etag "v1.0"

databricks lakeview delete-subscription

Delete a subscription for a dashboard schedule.

databricks lakeview delete-subscription DASHBOARD_ID SCHEDULE_ID SUBSCRIPTION_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard which the subscription belongs.

SCHEDULE_ID

    UUID identifying the schedule which the subscription belongs.

SUBSCRIPTION_ID

    UUID identifying the subscription.

Options

--etag string

    The etag for the subscription.

Global flags

Examples

The following example deletes a subscription:

databricks lakeview delete-subscription abc123 sch456 sub789

The following example deletes a subscription with etag:

databricks lakeview delete-subscription abc123 sch456 sub789 --etag "v1.0"

databricks lakeview get

Get a draft dashboard.

databricks lakeview get DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard.

Options

Global flags

Examples

The following example gets a dashboard:

databricks lakeview get abc123

databricks lakeview get-published

Get the current published dashboard.

databricks lakeview get-published DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the published dashboard.

Options

Global flags

Examples

The following example gets a published dashboard:

databricks lakeview get-published abc123

databricks lakeview get-schedule

Get a schedule for a dashboard.

databricks lakeview get-schedule DASHBOARD_ID SCHEDULE_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the schedule belongs.

SCHEDULE_ID

    UUID identifying the schedule.

Options

Global flags

Examples

The following example gets a dashboard schedule:

databricks lakeview get-schedule abc123 sch456

databricks lakeview get-subscription

Get a subscription for a dashboard schedule.

databricks lakeview get-subscription DASHBOARD_ID SCHEDULE_ID SUBSCRIPTION_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard which the subscription belongs.

SCHEDULE_ID

    UUID identifying the schedule which the subscription belongs.

SUBSCRIPTION_ID

    UUID identifying the subscription.

Options

Global flags

Examples

The following example gets a subscription:

databricks lakeview get-subscription abc123 sch456 sub789

databricks lakeview list

List all dashboards.

databricks lakeview list [flags]

Options

--page-size int

    The number of dashboards to return per page.

--page-token string

    A page token, received from a previous ListDashboards call.

--show-trashed

    The flag to include dashboards located in the trash.

--view DashboardView

    DASHBOARD_VIEW_BASIC only includes summary metadata from the dashboard. Supported values: DASHBOARD_VIEW_BASIC

Global flags

Examples

The following example lists all dashboards:

databricks lakeview list

The following example lists dashboards with a specific page size:

databricks lakeview list --page-size 10

The following example lists dashboards including trashed ones:

databricks lakeview list --show-trashed

The following example lists dashboards with basic view:

databricks lakeview list --view DASHBOARD_VIEW_BASIC

databricks lakeview list-schedules

List all schedules for a dashboard.

databricks lakeview list-schedules DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the schedules belongs.

Options

--page-size int

    The number of schedules to return per page.

--page-token string

    A page token, received from a previous ListSchedules call.

Global flags

Examples

The following example lists schedules for a dashboard:

databricks lakeview list-schedules abc123

databricks lakeview list-subscriptions

List all subscriptions for a dashboard schedule.

databricks lakeview list-subscriptions DASHBOARD_ID SCHEDULE_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard which the subscriptions belongs.

SCHEDULE_ID

    UUID identifying the schedule which the subscriptions belongs.

Options

--page-size int

    The number of subscriptions to return per page.

--page-token string

    A page token, received from a previous ListSubscriptions call.

Global flags

Examples

The following example lists subscriptions for a schedule:

databricks lakeview list-subscriptions abc123 sch456

databricks lakeview migrate

Migrate a classic SQL dashboard to Lakeview.

databricks lakeview migrate SOURCE_DASHBOARD_ID [flags]

Arguments

SOURCE_DASHBOARD_ID

    UUID of the dashboard to be migrated.

Options

--display-name string

    Display name for the new Lakeview dashboard.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--parent-path string

    The workspace path of the folder to contain the migrated Lakeview dashboard.

--update-parameter-syntax

    Flag to indicate if mustache parameter syntax ({{ param }}) should be auto-updated to named syntax (:param) when converting datasets in the dashboard.

Global flags

Examples

The following example migrates a classic SQL dashboard to Lakeview:

databricks lakeview migrate old123 --display-name "Migrated Sales Dashboard"

The following example migrates a dashboard to a specific folder:

databricks lakeview migrate old123 --display-name "Migrated Report" --parent-path "/Workspace/Reports"

The following example migrates a dashboard with parameter syntax update:

databricks lakeview migrate old123 --display-name "Migrated Dashboard" --update-parameter-syntax

databricks lakeview publish

Publish the current draft dashboard.

databricks lakeview publish DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to be published.

Options

--embed-credentials

    Flag to indicate if the publisher's credentials should be embedded in the published dashboard.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--warehouse-id string

    The ID of the warehouse that can be used to override the warehouse which was set in the draft.

Global flags

Examples

The following example publishes a dashboard:

databricks lakeview publish abc123

The following example publishes a dashboard with embedded credentials:

databricks lakeview publish abc123 --embed-credentials

The following example publishes a dashboard with a specific warehouse:

databricks lakeview publish abc123 --warehouse-id "wh456"

databricks lakeview trash

Trash a dashboard.

databricks lakeview trash DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard.

Options

Global flags

Examples

The following example trashes a dashboard:

databricks lakeview trash abc123

databricks lakeview unpublish

Unpublish the dashboard.

databricks lakeview unpublish DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the published dashboard.

Options

Global flags

Examples

The following example unpublishes a dashboard:

databricks lakeview unpublish abc123

databricks lakeview update

Update a draft dashboard.

databricks lakeview update DASHBOARD_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard.

Options

--display-name string

    The display name of the dashboard.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--serialized-dashboard string

    The contents of the dashboard in serialized string form.

--warehouse-id string

    The warehouse ID used to run the dashboard.

Global flags

Examples

The following example updates a dashboard's display name:

databricks lakeview update abc123 --display-name "Updated Sales Dashboard"

The following example updates a dashboard's warehouse:

databricks lakeview update abc123 --warehouse-id "wh456"

databricks lakeview update-schedule

Update a schedule for a dashboard.

databricks lakeview update-schedule DASHBOARD_ID SCHEDULE_ID [flags]

Arguments

DASHBOARD_ID

    UUID identifying the dashboard to which the schedule belongs.

SCHEDULE_ID

    UUID identifying the schedule.

Options

--display-name string

    The display name for schedule.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--pause-status SchedulePauseStatus

    The status indicates whether this schedule is paused or not. Supported values: PAUSED, UNPAUSED

--warehouse-id string

    The warehouse id to run the dashboard with for the schedule.

Global flags

Examples

The following example updates a schedule's display name:

databricks lakeview update-schedule abc123 sch456 --display-name "Updated Daily Report"

The following example pauses a schedule:

databricks lakeview update-schedule abc123 sch456 --pause-status PAUSED

The following example updates a schedule with a different warehouse:

databricks lakeview update-schedule abc123 sch456 --warehouse-id "wh789"

Global flags

--debug

  Whether to enable debug logging.

-h or --help

    Display help for the Databricks CLI or the related command group or the related command.

--log-file string

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

--log-format format

    The log format type, text or json. The default value is text.

--log-level string

    A string representing the log format level. If not specified then the log format level is disabled.

-o, --output type

    The command output type, text or json. The default value is text.

-p, --profile string

    The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.

--progress-format format

    The format to display progress logs: default, append, inplace, or json

-t, --target string

    If applicable, the bundle target to use