genie
Creates, updates, deletes, gets or lists a genie resource.
Overview
| Name | genie |
| Type | Resource |
| Id | databricks_workspace.dashboards.genie |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
space_id | string | |
warehouse_id | string | Warehouse associated with the Genie Space |
description | string | Description of the Genie Space |
serialized_space | string | The 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. |
title | string | Title of the Genie Space |
| Name | Datatype | Description |
|---|---|---|
next_page_token | string | |
spaces | array | List of Genie spaces |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | space_id, deployment_name | include_serialized_space | Get details of a Genie Space. |
list | select | deployment_name | page_size, page_token | Get list of Genie Spaces. |
create | insert | deployment_name, warehouse_id, serialized_space | Creates a Genie space from a serialized payload. | |
update | update | space_id, deployment_name | Updates a Genie space with a serialized payload. | |
delete | delete | space_id, deployment_name | Move 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
space_id | string | The ID associated with the Genie space to be sent to the trash. |
include_serialized_space | boolean | Whether to include the serialized space export in the response. Requires at least CAN EDIT permission on the space. |
page_size | integer | Maximum number of spaces to return per page |
page_token | string | Pagination token for getting the next page of results |
SELECT examples
- get
- list
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 }}'
;
Get list of Genie Spaces.
SELECT
next_page_token,
spaces
FROM databricks_workspace.dashboards.genie
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: genie
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the genie resource.
- name: warehouse_id
value: "{{ warehouse_id }}"
description: |
Warehouse to associate with the new space
- name: serialized_space
value: "{{ serialized_space }}"
description: |
The contents of the Genie Space in serialized string form. 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.
- name: description
value: "{{ description }}"
description: |
Optional description
- name: parent_path
value: "{{ parent_path }}"
description: |
Parent folder path where the space will be registered
- name: title
value: "{{ title }}"
description: |
Optional title override
UPDATE examples
- update
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
- delete
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
;