Skip to main content

genie

Creates, updates, deletes, gets or lists a genie resource.

Overview

Namegenie
TypeResource
Iddatabricks_workspace.dashboards.genie

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
space_idstring
warehouse_idstringWarehouse associated with the Genie Space
descriptionstringDescription of the Genie Space
serialized_spacestringThe contents of the Genie Space in serialized string form. This field is excluded in List Genie spaces responses. Use the [Get Genie Space](:method:genie/getspace) API to retrieve an example response, which includes the `serialized_space` field. This field provides the structure of the JSON string that represents the space's layout and components.
titlestringTitle of the Genie Space

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectspace_id, deployment_nameinclude_serialized_spaceGet details of a Genie Space.
listselectdeployment_namepage_size, page_tokenGet list of Genie Spaces.
createinsertdeployment_name, warehouse_id, serialized_spaceCreates a Genie space from a serialized payload.
updateupdatespace_id, deployment_nameUpdates a Genie space with a serialized payload.
deletedeletespace_id, deployment_nameMove a Genie Space to the trash.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
space_idstringThe ID associated with the Genie space to be sent to the trash.
include_serialized_spacebooleanWhether to include the serialized space export in the response. Requires at least CAN EDIT permission on the space.
page_sizeintegerMaximum number of spaces to return per page
page_tokenstringPagination token for getting the next page of results

SELECT examples

Get details of a Genie Space.

SELECT
space_id,
warehouse_id,
description,
serialized_space,
title
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND include_serialized_space = '{{ include_serialized_space }}'
;

INSERT examples

Creates a Genie space from a serialized payload.

INSERT INTO databricks_workspace.dashboards.genie (
warehouse_id,
serialized_space,
description,
parent_path,
title,
deployment_name
)
SELECT
'{{ warehouse_id }}' /* required */,
'{{ serialized_space }}' /* required */,
'{{ description }}',
'{{ parent_path }}',
'{{ title }}',
'{{ deployment_name }}'
RETURNING
space_id,
warehouse_id,
description,
serialized_space,
title
;

UPDATE examples

Updates a Genie space with a serialized payload.

UPDATE databricks_workspace.dashboards.genie
SET
description = '{{ description }}',
serialized_space = '{{ serialized_space }}',
title = '{{ title }}',
warehouse_id = '{{ warehouse_id }}'
WHERE
space_id = '{{ space_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
space_id,
warehouse_id,
description,
serialized_space,
title;

DELETE examples

Move a Genie Space to the trash.

DELETE FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;