w.lakeview: Lakeview

class databricks.sdk.service.dashboards.LakeviewAPI

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

create(dashboard: Dashboard [, dataset_catalog: Optional[str], dataset_schema: Optional[str]]) → Dashboard

Create a draft dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard – Dashboard

  • dataset_catalog – str (optional) Sets the default catalog for all datasets in this dashboard. Does not impact table references that use fully qualified catalog names (ex: samples.nyctaxi.trips). Leave blank to keep each dataset’s existing configuration.

  • dataset_schema – str (optional) Sets the default schema for all datasets in this dashboard. Does not impact table references that use fully qualified schema names (ex: nyctaxi.trips). Leave blank to keep each dataset’s existing configuration.

Returns:

Dashboard

create_schedule(dashboard_id: str, schedule: Schedule) → Schedule

Create dashboard schedule.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the schedule belongs.

  • schedule – Schedule The schedule to create. A dashboard is limited to 10 schedules.

Returns:

Schedule

create_subscription(dashboard_id: str, schedule_id: str, subscription: Subscription) → Subscription

Create schedule subscription.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the subscription belongs.

  • schedule_id – str UUID identifying the schedule to which the subscription belongs.

  • subscription – Subscription The subscription to create. A schedule is limited to 100 subscriptions.

Returns:

Subscription

delete_schedule(dashboard_id: str, schedule_id: str [, etag: Optional[str]])

Delete dashboard schedule.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the schedule belongs.

  • schedule_id – str UUID identifying the schedule.

  • etag – str (optional) The etag for the schedule. Optionally, it can be provided to verify that the schedule has not been modified from its last retrieval.

delete_subscription(dashboard_id: str, schedule_id: str, subscription_id: str [, etag: Optional[str]])

Delete schedule subscription.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard which the subscription belongs.

  • schedule_id – str UUID identifying the schedule which the subscription belongs.

  • subscription_id – str UUID identifying the subscription.

  • etag – str (optional) The etag for the subscription. Can be optionally provided to ensure that the subscription has not been modified since the last read.

get(dashboard_id: str) → Dashboard

Get a draft dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:

dashboard_id – str UUID identifying the dashboard.

Returns:

Dashboard

get_published(dashboard_id: str) → PublishedDashboard

Get the current published dashboard.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:

dashboard_id – str UUID identifying the published dashboard.

Returns:

PublishedDashboard

get_schedule(dashboard_id: str, schedule_id: str) → Schedule

Get dashboard schedule.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the schedule belongs.

  • schedule_id – str UUID identifying the schedule.

Returns:

Schedule

get_subscription(dashboard_id: str, schedule_id: str, subscription_id: str) → Subscription

Get schedule subscription.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard which the subscription belongs.

  • schedule_id – str UUID identifying the schedule which the subscription belongs.

  • subscription_id – str UUID identifying the subscription.

Returns:

Subscription

list([, page_size: Optional[int], page_token: Optional[str], show_trashed: Optional[bool], view: Optional[DashboardView]]) → Iterator[Dashboard]

List dashboards.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • page_size – int (optional) The number of dashboards to return per page.

  • page_token – str (optional) A page token, received from a previous ListDashboards call. This token can be used to retrieve the subsequent page.

  • show_trashed – bool (optional) The flag to include dashboards located in the trash. If unspecified, only active dashboards will be returned.

  • view – DashboardView (optional) DASHBOARD_VIEW_BASIC only includes summary metadata from the dashboard.

Returns:

Iterator over Dashboard

list_schedules(dashboard_id: str [, page_size: Optional[int], page_token: Optional[str]]) → Iterator[Schedule]

List dashboard schedules.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the schedules belongs.

  • page_size – int (optional) The number of schedules to return per page.

  • page_token – str (optional) A page token, received from a previous ListSchedules call. Use this to retrieve the subsequent page.

Returns:

Iterator over Schedule

list_subscriptions(dashboard_id: str, schedule_id: str [, page_size: Optional[int], page_token: Optional[str]]) → Iterator[Subscription]

List schedule subscriptions.

The caller must be a workspace user with one of the following entitlements: Workspace access, Databricks SQL access, or Consumer access.

Account-level users who are not members of the workspace cannot call this endpoint, even if the dashboard has been shared with them.

Parameters:
  • dashboard_id – str UUID identifying the dashboard which the subscriptions belongs.

  • schedule_id – str UUID identifying the schedule which the subscriptions belongs.

  • page_size – int (optional) The number of subscriptions to return per page.

  • page_token – str (optional) A page token, received from a previous ListSubscriptions call. Use this to retrieve the subsequent page.

Returns:

Iterator over Subscription

migrate(source_dashboard_id: str [, display_name: Optional[str], parent_path: Optional[str], update_parameter_syntax: Optional[bool]]) → Dashboard

Deprecated: Legacy dashboard migration is no longer supported. Use Lakeview (AI/BI) dashboards instead.

Parameters:
  • source_dashboard_id – str UUID of the dashboard to be migrated.

  • display_name – str (optional) Display name for the new Lakeview dashboard.

  • parent_path – str (optional) The workspace path of the folder to contain the migrated Lakeview dashboard.

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

Returns:

Dashboard

publish(dashboard_id: str [, embed_credentials: Optional[bool], warehouse_id: Optional[str]]) → PublishedDashboard

Publish the current draft dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to be published.

  • embed_credentials – bool (optional) Flag to indicate if the publisher’s credentials should be embedded in the published dashboard. These embedded credentials will be used to execute the published dashboard’s queries.

  • warehouse_id – str (optional) The ID of the warehouse that can be used to override the warehouse which was set in the draft.

Returns:

PublishedDashboard

revert(dashboard_id: str [, etag: Optional[str]]) → RevertDashboardResponse

Revert a dashboard’s definition in draft mode to the last published version.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard.

  • etag – str (optional) The etag for the dashboard. Optionally, it can be provided to verify that the dashboard has not been modified from its last retrieval.

Returns:

RevertDashboardResponse

trash(dashboard_id: str)

Trash a dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:

dashboard_id – str UUID identifying the dashboard.

unpublish(dashboard_id: str)

Unpublish the dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:

dashboard_id – str UUID identifying the published dashboard.

update(dashboard_id: str, dashboard: Dashboard [, dataset_catalog: Optional[str], dataset_schema: Optional[str]]) → Dashboard

Update a draft dashboard.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard.

  • dashboard – Dashboard

  • dataset_catalog – str (optional) Sets the default catalog for all datasets in this dashboard. Does not impact table references that use fully qualified catalog names (ex: samples.nyctaxi.trips). Leave blank to keep each dataset’s existing configuration.

  • dataset_schema – str (optional) Sets the default schema for all datasets in this dashboard. Does not impact table references that use fully qualified schema names (ex: nyctaxi.trips). Leave blank to keep each dataset’s existing configuration.

Returns:

Dashboard

update_schedule(dashboard_id: str, schedule_id: str, schedule: Schedule) → Schedule

Update dashboard schedule.

Requires the Databricks SQL access entitlement. Grant Databricks SQL access in addition to Workspace access.

Parameters:
  • dashboard_id – str UUID identifying the dashboard to which the schedule belongs.

  • schedule_id – str UUID identifying the schedule.

  • schedule – Schedule The schedule to update.

Returns:

Schedule