Databricks SQL

These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.sql module.

class databricks.sdk.service.sql.AccessControl
group_name: str | None = None
permission_level: PermissionLevel | None = None
  • CAN_VIEW: Can view the query * CAN_RUN: Can run the query * CAN_EDIT: Can edit the query

  • CAN_MANAGE: Can manage the query

user_name: str | None = None
as_dict() dict

Serializes the AccessControl into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) AccessControl

Deserializes the AccessControl from a dictionary.

class databricks.sdk.service.sql.Alert
created_at: str | None = None

Timestamp when the alert was created.

id: str | None = None

Alert ID.

last_triggered_at: str | None = None

Timestamp when the alert was last triggered.

name: str | None = None

Name of the alert.

options: AlertOptions | None = None

Alert configuration options.

parent: str | None = None

The identifier of the workspace folder containing the object.

query: AlertQuery | None = None
rearm: int | None = None

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If null, alert will never be triggered again.

state: AlertState | None = None

State of the alert. Possible values are: unknown (yet to be evaluated), triggered (evaluated and fulfilled trigger conditions), or ok (evaluated and did not fulfill trigger conditions).

updated_at: str | None = None

Timestamp when the alert was last updated.

user: User | None = None
as_dict() dict

Serializes the Alert into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Alert

Deserializes the Alert from a dictionary.

class databricks.sdk.service.sql.AlertOptions

Alert configuration options.

column: str

Name of column in the query result to compare in alert evaluation.

op: str

Operator used to compare in alert evaluation: >, >=, <, <=, ==, !=

value: Any

Value used to compare in alert evaluation. Supported types include strings (eg. ‘foobar’), floats (eg. 123.4), and booleans (true).

custom_body: str | None = None

Custom body of alert notification, if it exists. See [here] for custom templating instructions.

[here]: https://docs.databricks.com/sql/user/alerts/index.html

custom_subject: str | None = None

Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See [here] for custom templating instructions.

[here]: https://docs.databricks.com/sql/user/alerts/index.html

empty_result_state: AlertOptionsEmptyResultState | None = None

State that alert evaluates to when query result is empty.

muted: bool | None = None

Whether or not the alert is muted. If an alert is muted, it will not notify users and notification destinations when triggered.

as_dict() dict

Serializes the AlertOptions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) AlertOptions

Deserializes the AlertOptions from a dictionary.

class databricks.sdk.service.sql.AlertOptionsEmptyResultState

State that alert evaluates to when query result is empty.

OK = "OK"
TRIGGERED = "TRIGGERED"
UNKNOWN = "UNKNOWN"
class databricks.sdk.service.sql.AlertQuery
created_at: str | None = None

The timestamp when this query was created.

data_source_id: str | None = None

Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more].

[Learn more]: https://docs.databricks.com/api/workspace/datasources/list

description: str | None = None

General description that conveys additional information about this query such as usage notes.

id: str | None = None

Query ID.

is_archived: bool | None = None

Indicates whether the query is trashed. Trashed queries can’t be used in dashboards, or appear in search results. If this boolean is true, the options property for this query includes a moved_to_trash_at timestamp. Trashed queries are permanently deleted after 30 days.

is_draft: bool | None = None

Whether the query is a draft. Draft queries only appear in list views for their owners. Visualizations from draft queries cannot appear on dashboards.

is_safe: bool | None = None

Text parameter types are not safe from SQL injection for all types of data source. Set this Boolean parameter to true if a query either does not use any text type parameters or uses a data source type where text type parameters are handled safely.

name: str | None = None

The title of this query that appears in list views, widget headings, and on the query page.

options: QueryOptions | None = None
query: str | None = None

The text of the query to be run.

tags: List[str] | None = None
updated_at: str | None = None

The timestamp at which this query was last updated.

user_id: int | None = None

The ID of the user who owns the query.

as_dict() dict

Serializes the AlertQuery into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) AlertQuery

Deserializes the AlertQuery from a dictionary.

class databricks.sdk.service.sql.AlertState

State of the alert. Possible values are: unknown (yet to be evaluated), triggered (evaluated and fulfilled trigger conditions), or ok (evaluated and did not fulfill trigger conditions).

OK = "OK"
TRIGGERED = "TRIGGERED"
UNKNOWN = "UNKNOWN"
class databricks.sdk.service.sql.BaseChunkInfo

Describes metadata for a particular chunk, within a result set; this structure is used both within a manifest, and when fetching individual chunk data or links.

byte_count: int | None = None

The number of bytes in the result chunk. This field is not available when using INLINE disposition.

chunk_index: int | None = None

The position within the sequence of result set chunks.

row_count: int | None = None

The number of rows within the result chunk.

row_offset: int | None = None

The starting row offset within the result set.

as_dict() dict

Serializes the BaseChunkInfo into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) BaseChunkInfo

Deserializes the BaseChunkInfo from a dictionary.

class databricks.sdk.service.sql.CancelExecutionResponse
as_dict() dict

Serializes the CancelExecutionResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) CancelExecutionResponse

Deserializes the CancelExecutionResponse from a dictionary.

class databricks.sdk.service.sql.Channel
dbsql_version: str | None = None
name: ChannelName | None = None
as_dict() dict

Serializes the Channel into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Channel

Deserializes the Channel from a dictionary.

class databricks.sdk.service.sql.ChannelInfo

Channel information for the SQL warehouse at the time of query execution

dbsql_version: str | None = None

DBSQL Version the channel is mapped to

name: ChannelName | None = None

Name of the channel

as_dict() dict

Serializes the ChannelInfo into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ChannelInfo

Deserializes the ChannelInfo from a dictionary.

class databricks.sdk.service.sql.ChannelName

Name of the channel

CHANNEL_NAME_CURRENT = "CHANNEL_NAME_CURRENT"
CHANNEL_NAME_CUSTOM = "CHANNEL_NAME_CUSTOM"
CHANNEL_NAME_PREVIEW = "CHANNEL_NAME_PREVIEW"
CHANNEL_NAME_PREVIOUS = "CHANNEL_NAME_PREVIOUS"
CHANNEL_NAME_UNSPECIFIED = "CHANNEL_NAME_UNSPECIFIED"
class databricks.sdk.service.sql.ColumnInfo
name: str | None = None

The name of the column.

position: int | None = None

The ordinal position of the column (starting at position 0).

type_interval_type: str | None = None

The format of the interval type.

type_name: ColumnInfoTypeName | None = None

The name of the base data type. This doesn’t include details for complex types such as STRUCT, MAP or ARRAY.

type_precision: int | None = None

Specifies the number of digits in a number. This applies to the DECIMAL type.

type_scale: int | None = None

Specifies the number of digits to the right of the decimal point in a number. This applies to the DECIMAL type.

type_text: str | None = None

The full SQL type specification.

as_dict() dict

Serializes the ColumnInfo into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ColumnInfo

Deserializes the ColumnInfo from a dictionary.

class databricks.sdk.service.sql.ColumnInfoTypeName

The name of the base data type. This doesn’t include details for complex types such as STRUCT, MAP or ARRAY.

ARRAY = "ARRAY"
BINARY = "BINARY"
BOOLEAN = "BOOLEAN"
BYTE = "BYTE"
CHAR = "CHAR"
DATE = "DATE"
DECIMAL = "DECIMAL"
DOUBLE = "DOUBLE"
FLOAT = "FLOAT"
INT = "INT"
INTERVAL = "INTERVAL"
LONG = "LONG"
MAP = "MAP"
NULL = "NULL"
SHORT = "SHORT"
STRING = "STRING"
STRUCT = "STRUCT"
TIMESTAMP = "TIMESTAMP"
USER_DEFINED_TYPE = "USER_DEFINED_TYPE"
class databricks.sdk.service.sql.CreateAlert
name: str

Name of the alert.

options: AlertOptions

Alert configuration options.

query_id: str

Query ID.

parent: str | None = None

The identifier of the workspace folder containing the object.

rearm: int | None = None

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If null, alert will never be triggered again.

as_dict() dict

Serializes the CreateAlert into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) CreateAlert

Deserializes the CreateAlert from a dictionary.

class databricks.sdk.service.sql.CreateWarehouseRequest
auto_stop_mins: int | None = None

The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped.

Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop.

Defaults to 120 mins

channel: Channel | None = None

Channel Details

cluster_size: str | None = None

Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune max_num_clusters.

Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large

creator_name: str | None = None

warehouse creator name

enable_photon: bool | None = None

Configures whether the warehouse should use Photon optimized clusters.

Defaults to false.

enable_serverless_compute: bool | None = None

Configures whether the warehouse should use serverless compute

instance_profile_arn: str | None = None

Deprecated. Instance profile used to pass IAM role to the cluster

max_num_clusters: int | None = None

Maximum number of clusters that the autoscaler will create to handle concurrent queries.

Supported values: - Must be >= min_num_clusters - Must be <= 30.

Defaults to min_clusters if unset.

min_num_clusters: int | None = None

Minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager.

Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30)

Defaults to 1

name: str | None = None

Logical name for the cluster.

Supported values: - Must be unique within an org. - Must be less than 100 characters.

spot_instance_policy: SpotInstancePolicy | None = None

Configurations whether the warehouse should use spot instances.

tags: EndpointTags | None = None

A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse.

Supported values: - Number of tags < 45.

warehouse_type: CreateWarehouseRequestWarehouseType | None = None

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

as_dict() dict

Serializes the CreateWarehouseRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) CreateWarehouseRequest

Deserializes the CreateWarehouseRequest from a dictionary.

class databricks.sdk.service.sql.CreateWarehouseRequestWarehouseType

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

CLASSIC = "CLASSIC"
PRO = "PRO"
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED"
class databricks.sdk.service.sql.CreateWarehouseResponse
id: str | None = None

Id for the SQL warehouse. This value is unique across all SQL warehouses.

as_dict() dict

Serializes the CreateWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) CreateWarehouseResponse

Deserializes the CreateWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.CreateWidget
dashboard_id: str

Dashboard ID returned by :method:dashboards/create.

options: WidgetOptions
width: int

Width of a widget

id: str | None = None

Widget ID returned by :method:dashboardwidgets/create

text: str | None = None

If this is a textbox widget, the application displays this text. This field is ignored if the widget contains a visualization in the visualization field.

visualization_id: str | None = None

Query Vizualization ID returned by :method:queryvisualizations/create.

as_dict() dict

Serializes the CreateWidget into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) CreateWidget

Deserializes the CreateWidget from a dictionary.

class databricks.sdk.service.sql.Dashboard

A JSON representing a dashboard containing widgets of visualizations and text boxes.

can_edit: bool | None = None

Whether the authenticated user can edit the query definition.

created_at: str | None = None

Timestamp when this dashboard was created.

dashboard_filters_enabled: bool | None = None

In the web application, query filters that share a name are coupled to a single selection box if this value is true.

id: str | None = None

The ID for this dashboard.

is_archived: bool | None = None

Indicates whether a dashboard is trashed. Trashed dashboards won’t appear in list views. If this boolean is true, the options property for this dashboard includes a moved_to_trash_at timestamp. Items in trash are permanently deleted after 30 days.

is_draft: bool | None = None

Whether a dashboard is a draft. Draft dashboards only appear in list views for their owners.

is_favorite: bool | None = None

Indicates whether this query object appears in the current user’s favorites list. This flag determines whether the star icon for favorites is selected.

name: str | None = None

The title of the dashboard that appears in list views and at the top of the dashboard page.

options: DashboardOptions | None = None
parent: str | None = None

The identifier of the workspace folder containing the object.

permission_tier: PermissionLevel | None = None
  • CAN_VIEW: Can view the query * CAN_RUN: Can run the query * CAN_EDIT: Can edit the query

  • CAN_MANAGE: Can manage the query

slug: str | None = None

URL slug. Usually mirrors the query name with dashes (-) instead of spaces. Appears in the URL for this query.

tags: List[str] | None = None
updated_at: str | None = None

Timestamp when this dashboard was last updated.

user: User | None = None
user_id: int | None = None

The ID of the user who owns the dashboard.

widgets: List[Widget] | None = None
as_dict() dict

Serializes the Dashboard into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Dashboard

Deserializes the Dashboard from a dictionary.

class databricks.sdk.service.sql.DashboardEditContent
dashboard_id: str | None = None
name: str | None = None

The title of this dashboard that appears in list views and at the top of the dashboard page.

run_as_role: RunAsRole | None = None

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

tags: List[str] | None = None
as_dict() dict

Serializes the DashboardEditContent into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DashboardEditContent

Deserializes the DashboardEditContent from a dictionary.

class databricks.sdk.service.sql.DashboardOptions
moved_to_trash_at: str | None = None

The timestamp when this dashboard was moved to trash. Only present when the is_archived property is true. Trashed items are deleted after thirty days.

as_dict() dict

Serializes the DashboardOptions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DashboardOptions

Deserializes the DashboardOptions from a dictionary.

class databricks.sdk.service.sql.DashboardPostContent
name: str

The title of this dashboard that appears in list views and at the top of the dashboard page.

dashboard_filters_enabled: bool | None = None

Indicates whether the dashboard filters are enabled

is_favorite: bool | None = None

Indicates whether this dashboard object should appear in the current user’s favorites list.

parent: str | None = None

The identifier of the workspace folder containing the object.

run_as_role: RunAsRole | None = None

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

tags: List[str] | None = None
as_dict() dict

Serializes the DashboardPostContent into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DashboardPostContent

Deserializes the DashboardPostContent from a dictionary.

class databricks.sdk.service.sql.DataSource

A JSON object representing a DBSQL data source / SQL warehouse.

id: str | None = None

Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more].

[Learn more]: https://docs.databricks.com/api/workspace/datasources/list

name: str | None = None

The string name of this data source / SQL warehouse as it appears in the Databricks SQL web application.

pause_reason: str | None = None

Reserved for internal use.

paused: int | None = None

Reserved for internal use.

supports_auto_limit: bool | None = None

Reserved for internal use.

syntax: str | None = None

Reserved for internal use.

type: str | None = None

The type of data source. For SQL warehouses, this will be databricks_internal.

view_only: bool | None = None

Reserved for internal use.

warehouse_id: str | None = None

The ID of the associated SQL warehouse, if this data source is backed by a SQL warehouse.

as_dict() dict

Serializes the DataSource into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DataSource

Deserializes the DataSource from a dictionary.

class databricks.sdk.service.sql.DeleteResponse
as_dict() dict

Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DeleteResponse

Deserializes the DeleteResponse from a dictionary.

class databricks.sdk.service.sql.DeleteWarehouseResponse
as_dict() dict

Serializes the DeleteWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) DeleteWarehouseResponse

Deserializes the DeleteWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.Disposition

The fetch disposition provides two modes of fetching results: INLINE and EXTERNAL_LINKS. Statements executed with INLINE disposition will return result data inline, in JSON_ARRAY format, in a series of chunks. If a given statement produces a result set with a size larger than 25 MiB, that statement execution is aborted, and no result set will be available. NOTE Byte limits are computed based upon internal representations of the result set data, and might not match the sizes visible in JSON responses. Statements executed with EXTERNAL_LINKS disposition will return result data as external links: URLs that point to cloud storage internal to the workspace. Using EXTERNAL_LINKS disposition allows statements to generate arbitrarily sized result sets for fetching up to 100 GiB. The resulting links have two important properties: 1. They point to resources _external_ to the Databricks compute; therefore any associated authentication information (typically a personal access token, OAuth token, or similar) _must be removed_ when fetching from these links. 2. These are presigned URLs with a specific expiration, indicated in the response. The behavior when attempting to use an expired link is cloud specific.

INLINE = "INLINE"
class databricks.sdk.service.sql.EditAlert
name: str

Name of the alert.

options: AlertOptions

Alert configuration options.

query_id: str

Query ID.

alert_id: str | None = None
rearm: int | None = None

Number of seconds after being triggered before the alert rearms itself and can be triggered again. If null, alert will never be triggered again.

as_dict() dict

Serializes the EditAlert into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EditAlert

Deserializes the EditAlert from a dictionary.

class databricks.sdk.service.sql.EditWarehouseRequest
auto_stop_mins: int | None = None

The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped.

Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop.

Defaults to 120 mins

channel: Channel | None = None

Channel Details

cluster_size: str | None = None

Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune max_num_clusters.

Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large

creator_name: str | None = None

warehouse creator name

enable_photon: bool | None = None

Configures whether the warehouse should use Photon optimized clusters.

Defaults to false.

enable_serverless_compute: bool | None = None

Configures whether the warehouse should use serverless compute.

id: str | None = None

Required. Id of the warehouse to configure.

instance_profile_arn: str | None = None

Deprecated. Instance profile used to pass IAM role to the cluster

max_num_clusters: int | None = None

Maximum number of clusters that the autoscaler will create to handle concurrent queries.

Supported values: - Must be >= min_num_clusters - Must be <= 30.

Defaults to min_clusters if unset.

min_num_clusters: int | None = None

Minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager.

Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30)

Defaults to 1

name: str | None = None

Logical name for the cluster.

Supported values: - Must be unique within an org. - Must be less than 100 characters.

spot_instance_policy: SpotInstancePolicy | None = None

Configurations whether the warehouse should use spot instances.

tags: EndpointTags | None = None

A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse.

Supported values: - Number of tags < 45.

warehouse_type: EditWarehouseRequestWarehouseType | None = None

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

as_dict() dict

Serializes the EditWarehouseRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EditWarehouseRequest

Deserializes the EditWarehouseRequest from a dictionary.

class databricks.sdk.service.sql.EditWarehouseRequestWarehouseType

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

CLASSIC = "CLASSIC"
PRO = "PRO"
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED"
class databricks.sdk.service.sql.EditWarehouseResponse
as_dict() dict

Serializes the EditWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EditWarehouseResponse

Deserializes the EditWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.EndpointConfPair
key: str | None = None
value: str | None = None
as_dict() dict

Serializes the EndpointConfPair into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EndpointConfPair

Deserializes the EndpointConfPair from a dictionary.

class databricks.sdk.service.sql.EndpointHealth
details: str | None = None

Details about errors that are causing current degraded/failed status.

failure_reason: TerminationReason | None = None

The reason for failure to bring up clusters for this warehouse. This is available when status is ‘FAILED’ and sometimes when it is DEGRADED.

message: str | None = None

Deprecated. split into summary and details for security

status: Status | None = None

Health status of the warehouse.

summary: str | None = None

A short summary of the health status in case of degraded/failed warehouses.

as_dict() dict

Serializes the EndpointHealth into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EndpointHealth

Deserializes the EndpointHealth from a dictionary.

class databricks.sdk.service.sql.EndpointInfo
auto_stop_mins: int | None = None

The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped.

Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop.

Defaults to 120 mins

channel: Channel | None = None

Channel Details

cluster_size: str | None = None

Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune max_num_clusters.

Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large

creator_name: str | None = None

warehouse creator name

enable_photon: bool | None = None

Configures whether the warehouse should use Photon optimized clusters.

Defaults to false.

enable_serverless_compute: bool | None = None

Configures whether the warehouse should use serverless compute

health: EndpointHealth | None = None

Optional health status. Assume the warehouse is healthy if this field is not set.

id: str | None = None

unique identifier for warehouse

instance_profile_arn: str | None = None

Deprecated. Instance profile used to pass IAM role to the cluster

jdbc_url: str | None = None

the jdbc connection string for this warehouse

max_num_clusters: int | None = None

Maximum number of clusters that the autoscaler will create to handle concurrent queries.

Supported values: - Must be >= min_num_clusters - Must be <= 30.

Defaults to min_clusters if unset.

min_num_clusters: int | None = None

Minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager.

Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30)

Defaults to 1

name: str | None = None

Logical name for the cluster.

Supported values: - Must be unique within an org. - Must be less than 100 characters.

num_active_sessions: int | None = None

current number of active sessions for the warehouse

num_clusters: int | None = None

current number of clusters running for the service

odbc_params: OdbcParams | None = None

ODBC parameters for the SQL warehouse

spot_instance_policy: SpotInstancePolicy | None = None

Configurations whether the warehouse should use spot instances.

state: State | None = None

State of the warehouse

tags: EndpointTags | None = None

A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse.

Supported values: - Number of tags < 45.

warehouse_type: EndpointInfoWarehouseType | None = None

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

as_dict() dict

Serializes the EndpointInfo into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EndpointInfo

Deserializes the EndpointInfo from a dictionary.

class databricks.sdk.service.sql.EndpointInfoWarehouseType

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

CLASSIC = "CLASSIC"
PRO = "PRO"
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED"
class databricks.sdk.service.sql.EndpointTagPair
key: str | None = None
value: str | None = None
as_dict() dict

Serializes the EndpointTagPair into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EndpointTagPair

Deserializes the EndpointTagPair from a dictionary.

class databricks.sdk.service.sql.EndpointTags
custom_tags: List[EndpointTagPair] | None = None
as_dict() dict

Serializes the EndpointTags into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) EndpointTags

Deserializes the EndpointTags from a dictionary.

class databricks.sdk.service.sql.ExecuteStatementRequest
statement: str

The SQL statement to execute. The statement can optionally be parameterized, see parameters.

warehouse_id: str

Warehouse upon which to execute a statement. See also [What are SQL warehouses?](/sql/admin/warehouse-type.html)

byte_limit: int | None = None

Applies the given byte limit to the statement’s result size. Byte counts are based on internal data representations and might not match the final size in the requested format. If the result was truncated due to the byte limit, then truncated in the response is set to true. When using EXTERNAL_LINKS disposition, a default byte_limit of 100 GiB is applied if byte_limit is not explcitly set.

catalog: str | None = None

Sets default catalog for statement execution, similar to [USE CATALOG] in SQL.

[USE CATALOG]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html

disposition: Disposition | None = None

The fetch disposition provides two modes of fetching results: INLINE and EXTERNAL_LINKS.

Statements executed with INLINE disposition will return result data inline, in JSON_ARRAY format, in a series of chunks. If a given statement produces a result set with a size larger than 25 MiB, that statement execution is aborted, and no result set will be available.

NOTE Byte limits are computed based upon internal representations of the result set data, and might not match the sizes visible in JSON responses.

Statements executed with EXTERNAL_LINKS disposition will return result data as external links: URLs that point to cloud storage internal to the workspace. Using EXTERNAL_LINKS disposition allows statements to generate arbitrarily sized result sets for fetching up to 100 GiB. The resulting links have two important properties:

1. They point to resources _external_ to the Databricks compute; therefore any associated authentication information (typically a personal access token, OAuth token, or similar) _must be removed_ when fetching from these links.

2. These are presigned URLs with a specific expiration, indicated in the response. The behavior when attempting to use an expired link is cloud specific.

format: Format | None = None

Statement execution supports three result formats: JSON_ARRAY (default), ARROW_STREAM, and CSV.

Important: The formats ARROW_STREAM and CSV are supported only with EXTERNAL_LINKS disposition. JSON_ARRAY is supported in INLINE and EXTERNAL_LINKS disposition.

When specifying format=JSON_ARRAY, result data will be formatted as an array of arrays of values, where each value is either the string representation of a value, or null. For example, the output of SELECT concat(‘id-’, id) AS strCol, id AS intCol, null AS nullCol FROM range(3) would look like this:

` [ [ "id-1", "1", null ], [ "id-2", "2", null ], [ "id-3", "3", null ], ] `

When specifying format=JSON_ARRAY and disposition=EXTERNAL_LINKS, each chunk in the result contains compact JSON with no indentation or extra whitespace.

When specifying format=ARROW_STREAM and disposition=EXTERNAL_LINKS, each chunk in the result will be formatted as Apache Arrow Stream. See the [Apache Arrow streaming format].

When specifying format=CSV and disposition=EXTERNAL_LINKS, each chunk in the result will be a CSV according to [RFC 4180] standard. All the columns values will have string representation similar to the JSON_ARRAY format, and null values will be encoded as “null”. Only the first chunk in the result would contain a header row with column names. For example, the output of SELECT concat(‘id-’, id) AS strCol, id AS intCol, null as nullCol FROM range(3) would look like this:

` strCol,intCol,nullCol id-1,1,null id-2,2,null id-3,3,null `

[Apache Arrow streaming format]: https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format [RFC 4180]: https://www.rfc-editor.org/rfc/rfc4180

on_wait_timeout: ExecuteStatementRequestOnWaitTimeout | None = None

When wait_timeout > 0s, the call will block up to the specified time. If the statement execution doesn’t finish within this time, on_wait_timeout determines whether the execution should continue or be canceled. When set to CONTINUE, the statement execution continues asynchronously and the call returns a statement ID which can be used for polling with :method:statementexecution/getStatement. When set to CANCEL, the statement execution is canceled and the call returns with a CANCELED state.

parameters: List[StatementParameterListItem] | None = None

A list of parameters to pass into a SQL statement containing parameter markers. A parameter consists of a name, a value, and optionally a type. To represent a NULL value, the value field may be omitted or set to null explicitly. If the type field is omitted, the value is interpreted as a string.

If the type is given, parameters will be checked for type correctness according to the given type. A value is correct if the provided string can be converted to the requested type using the cast function. The exact semantics are described in the section [cast function] of the SQL language reference.

For example, the following statement contains two parameters, my_name and my_date:

SELECT * FROM my_table WHERE name = :my_name AND date = :my_date

The parameters can be passed in the request body as follows:

{ …, “statement”: “SELECT * FROM my_table WHERE name = :my_name AND date = :my_date”, “parameters”: [ { “name”: “my_name”, “value”: “the name” }, { “name”: “my_date”, “value”: “2020-01-01”, “type”: “DATE” } ] }

Currently, positional parameters denoted by a ? marker are not supported by the Databricks SQL Statement Execution API.

Also see the section [Parameter markers] of the SQL language reference.

[Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html [cast function]: https://docs.databricks.com/sql/language-manual/functions/cast.html

row_limit: int | None = None

Applies the given row limit to the statement’s result set, but unlike the LIMIT clause in SQL, it also sets the truncated field in the response to indicate whether the result was trimmed due to the limit or not.

schema: str | None = None

Sets default schema for statement execution, similar to [USE SCHEMA] in SQL.

[USE SCHEMA]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-schema.html

wait_timeout: str | None = None

The time in seconds the call will wait for the statement’s result set as Ns, where N can be set to 0 or to a value between 5 and 50.

When set to 0s, the statement will execute in asynchronous mode and the call will not wait for the execution to finish. In this case, the call returns directly with PENDING state and a statement ID which can be used for polling with :method:statementexecution/getStatement.

When set between 5 and 50 seconds, the call will behave synchronously up to this timeout and wait for the statement execution to finish. If the execution finishes within this time, the call returns immediately with a manifest and result data (or a FAILED state in case of an execution error). If the statement takes longer to execute, on_wait_timeout determines what should happen after the timeout is reached.

as_dict() dict

Serializes the ExecuteStatementRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ExecuteStatementRequest

Deserializes the ExecuteStatementRequest from a dictionary.

class databricks.sdk.service.sql.ExecuteStatementRequestOnWaitTimeout

When wait_timeout > 0s, the call will block up to the specified time. If the statement execution doesn’t finish within this time, on_wait_timeout determines whether the execution should continue or be canceled. When set to CONTINUE, the statement execution continues asynchronously and the call returns a statement ID which can be used for polling with :method:statementexecution/getStatement. When set to CANCEL, the statement execution is canceled and the call returns with a CANCELED state.

CANCEL = "CANCEL"
CONTINUE = "CONTINUE"
class databricks.sdk.service.sql.ExecuteStatementResponse
manifest: ResultManifest | None = None

The result manifest provides schema and metadata for the result set.

result: ResultData | None = None

Contains the result data of a single chunk when using INLINE disposition. When using EXTERNAL_LINKS disposition, the array external_links is used instead to provide presigned URLs to the result data in cloud storage. Exactly one of these alternatives is used. (While the external_links array prepares the API to return multiple links in a single response. Currently only a single link is returned.)

statement_id: str | None = None

The statement ID is returned upon successfully submitting a SQL statement, and is a required reference for all subsequent calls.

status: StatementStatus | None = None

The status response includes execution state and if relevant, error information.

as_dict() dict

Serializes the ExecuteStatementResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ExecuteStatementResponse

Deserializes the ExecuteStatementResponse from a dictionary.

byte_count: int | None = None

The number of bytes in the result chunk. This field is not available when using INLINE disposition.

chunk_index: int | None = None

The position within the sequence of result set chunks.

expiration: str | None = None

Indicates the date-time that the given external link will expire and becomes invalid, after which point a new external_link must be requested.

A presigned URL pointing to a chunk of result data, hosted by an external service, with a short expiration time (<= 15 minutes). As this URL contains a temporary credential, it should be considered sensitive and the client should not expose this URL in a log.

http_headers: Dict[str, str] | None = None

HTTP headers that must be included with a GET request to the external_link. Each header is provided as a key-value pair. Headers are typically used to pass a decryption key to the external service. The values of these headers should be considered sensitive and the client should not expose these values in a log.

next_chunk_index: int | None = None

When fetching, provides the chunk_index for the _next_ chunk. If absent, indicates there are no more chunks. The next chunk can be fetched with a :method:statementexecution/getStatementResultChunkN request.

When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more chunks. This link is an absolute path to be joined with your $DATABRICKS_HOST, and should be treated as an opaque link. This is an alternative to using next_chunk_index.

row_count: int | None = None

The number of rows within the result chunk.

row_offset: int | None = None

The starting row offset within the result set.

as_dict() dict

Serializes the ExternalLink into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ExternalLink

Deserializes the ExternalLink from a dictionary.

class databricks.sdk.service.sql.Format
ARROW_STREAM = "ARROW_STREAM"
CSV = "CSV"
JSON_ARRAY = "JSON_ARRAY"
class databricks.sdk.service.sql.GetResponse
access_control_list: List[AccessControl] | None = None
object_id: str | None = None

An object’s type and UUID, separated by a forward slash (/) character.

object_type: ObjectType | None = None

A singular noun object type.

as_dict() dict

Serializes the GetResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) GetResponse

Deserializes the GetResponse from a dictionary.

class databricks.sdk.service.sql.GetStatementResponse
manifest: ResultManifest | None = None

The result manifest provides schema and metadata for the result set.

result: ResultData | None = None

Contains the result data of a single chunk when using INLINE disposition. When using EXTERNAL_LINKS disposition, the array external_links is used instead to provide presigned URLs to the result data in cloud storage. Exactly one of these alternatives is used. (While the external_links array prepares the API to return multiple links in a single response. Currently only a single link is returned.)

statement_id: str | None = None

The statement ID is returned upon successfully submitting a SQL statement, and is a required reference for all subsequent calls.

status: StatementStatus | None = None

The status response includes execution state and if relevant, error information.

as_dict() dict

Serializes the GetStatementResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) GetStatementResponse

Deserializes the GetStatementResponse from a dictionary.

class databricks.sdk.service.sql.GetWarehousePermissionLevelsResponse
permission_levels: List[WarehousePermissionsDescription] | None = None

Specific permission levels

as_dict() dict

Serializes the GetWarehousePermissionLevelsResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) GetWarehousePermissionLevelsResponse

Deserializes the GetWarehousePermissionLevelsResponse from a dictionary.

class databricks.sdk.service.sql.GetWarehouseResponse
auto_stop_mins: int | None = None

The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped.

Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop.

Defaults to 120 mins

channel: Channel | None = None

Channel Details

cluster_size: str | None = None

Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune max_num_clusters.

Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large

creator_name: str | None = None

warehouse creator name

enable_photon: bool | None = None

Configures whether the warehouse should use Photon optimized clusters.

Defaults to false.

enable_serverless_compute: bool | None = None

Configures whether the warehouse should use serverless compute

health: EndpointHealth | None = None

Optional health status. Assume the warehouse is healthy if this field is not set.

id: str | None = None

unique identifier for warehouse

instance_profile_arn: str | None = None

Deprecated. Instance profile used to pass IAM role to the cluster

jdbc_url: str | None = None

the jdbc connection string for this warehouse

max_num_clusters: int | None = None

Maximum number of clusters that the autoscaler will create to handle concurrent queries.

Supported values: - Must be >= min_num_clusters - Must be <= 30.

Defaults to min_clusters if unset.

min_num_clusters: int | None = None

Minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager.

Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30)

Defaults to 1

name: str | None = None

Logical name for the cluster.

Supported values: - Must be unique within an org. - Must be less than 100 characters.

num_active_sessions: int | None = None

current number of active sessions for the warehouse

num_clusters: int | None = None

current number of clusters running for the service

odbc_params: OdbcParams | None = None

ODBC parameters for the SQL warehouse

spot_instance_policy: SpotInstancePolicy | None = None

Configurations whether the warehouse should use spot instances.

state: State | None = None

State of the warehouse

tags: EndpointTags | None = None

A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse.

Supported values: - Number of tags < 45.

warehouse_type: GetWarehouseResponseWarehouseType | None = None

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

as_dict() dict

Serializes the GetWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) GetWarehouseResponse

Deserializes the GetWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.GetWarehouseResponseWarehouseType

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

CLASSIC = "CLASSIC"
PRO = "PRO"
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED"
class databricks.sdk.service.sql.GetWorkspaceWarehouseConfigResponse
channel: Channel | None = None

Optional: Channel selection details

config_param: RepeatedEndpointConfPairs | None = None

Deprecated: Use sql_configuration_parameters

data_access_config: List[EndpointConfPair] | None = None

Spark confs for external hive metastore configuration JSON serialized size must be less than <= 512K

enabled_warehouse_types: List[WarehouseTypePair] | None = None

List of Warehouse Types allowed in this workspace (limits allowed value of the type field in CreateWarehouse and EditWarehouse). Note: Some types cannot be disabled, they don’t need to be specified in SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing warehouses to be converted to another type. Used by frontend to save specific type availability in the warehouse create and edit form UI.

global_param: RepeatedEndpointConfPairs | None = None

Deprecated: Use sql_configuration_parameters

google_service_account: str | None = None

GCP only: Google Service Account used to pass to cluster to access Google Cloud Storage

instance_profile_arn: str | None = None

AWS Only: Instance profile used to pass IAM role to the cluster

security_policy: GetWorkspaceWarehouseConfigResponseSecurityPolicy | None = None

Security policy for warehouses

sql_configuration_parameters: RepeatedEndpointConfPairs | None = None

SQL configuration parameters

as_dict() dict

Serializes the GetWorkspaceWarehouseConfigResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) GetWorkspaceWarehouseConfigResponse

Deserializes the GetWorkspaceWarehouseConfigResponse from a dictionary.

class databricks.sdk.service.sql.GetWorkspaceWarehouseConfigResponseSecurityPolicy

Security policy for warehouses

DATA_ACCESS_CONTROL = "DATA_ACCESS_CONTROL"
NONE = "NONE"
PASSTHROUGH = "PASSTHROUGH"
class databricks.sdk.service.sql.ListOrder
CREATED_AT = "CREATED_AT"
NAME = "NAME"
class databricks.sdk.service.sql.ListQueriesResponse
has_next_page: bool | None = None

Whether there is another page of results.

next_page_token: str | None = None

A token that can be used to get the next page of results.

res: List[QueryInfo] | None = None
as_dict() dict

Serializes the ListQueriesResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ListQueriesResponse

Deserializes the ListQueriesResponse from a dictionary.

class databricks.sdk.service.sql.ListResponse
count: int | None = None

The total number of dashboards.

page: int | None = None

The current page being displayed.

page_size: int | None = None

The number of dashboards per page.

results: List[Dashboard] | None = None

List of dashboards returned.

as_dict() dict

Serializes the ListResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ListResponse

Deserializes the ListResponse from a dictionary.

class databricks.sdk.service.sql.ListWarehousesResponse
warehouses: List[EndpointInfo] | None = None

A list of warehouses and their configurations.

as_dict() dict

Serializes the ListWarehousesResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ListWarehousesResponse

Deserializes the ListWarehousesResponse from a dictionary.

class databricks.sdk.service.sql.MultiValuesOptions

If specified, allows multiple values to be selected for this parameter. Only applies to dropdown list and query-based dropdown list parameters.

prefix: str | None = None

Character that prefixes each selected parameter value.

separator: str | None = None

Character that separates each selected parameter value. Defaults to a comma.

suffix: str | None = None

Character that suffixes each selected parameter value.

as_dict() dict

Serializes the MultiValuesOptions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) MultiValuesOptions

Deserializes the MultiValuesOptions from a dictionary.

class databricks.sdk.service.sql.ObjectType

A singular noun object type.

ALERT = "ALERT"
DASHBOARD = "DASHBOARD"
DATA_SOURCE = "DATA_SOURCE"
QUERY = "QUERY"
class databricks.sdk.service.sql.ObjectTypePlural

Always a plural of the object type.

ALERTS = "ALERTS"
DASHBOARDS = "DASHBOARDS"
DATA_SOURCES = "DATA_SOURCES"
QUERIES = "QUERIES"
class databricks.sdk.service.sql.OdbcParams
hostname: str | None = None
path: str | None = None
port: int | None = None
protocol: str | None = None
as_dict() dict

Serializes the OdbcParams into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) OdbcParams

Deserializes the OdbcParams from a dictionary.

class databricks.sdk.service.sql.OwnableObjectType

The singular form of the type of object which can be owned.

ALERT = "ALERT"
DASHBOARD = "DASHBOARD"
QUERY = "QUERY"
class databricks.sdk.service.sql.Parameter
enum_options: str | None = None

List of valid parameter values, newline delimited. Only applies for dropdown list parameters.

multi_values_options: MultiValuesOptions | None = None

If specified, allows multiple values to be selected for this parameter. Only applies to dropdown list and query-based dropdown list parameters.

name: str | None = None

The literal parameter marker that appears between double curly braces in the query text.

query_id: str | None = None

The UUID of the query that provides the parameter values. Only applies for query-based dropdown list parameters.

title: str | None = None

The text displayed in a parameter picking widget.

type: ParameterType | None = None

Parameters can have several different types.

value: Any | None = None

The default value for this parameter.

as_dict() dict

Serializes the Parameter into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Parameter

Deserializes the Parameter from a dictionary.

class databricks.sdk.service.sql.ParameterType

Parameters can have several different types.

DATETIME = "DATETIME"
ENUM = "ENUM"
NUMBER = "NUMBER"
QUERY = "QUERY"
TEXT = "TEXT"
class databricks.sdk.service.sql.PermissionLevel
  • CAN_VIEW: Can view the query * CAN_RUN: Can run the query * CAN_EDIT: Can edit the query * CAN_MANAGE: Can manage the query

CAN_EDIT = "CAN_EDIT"
CAN_MANAGE = "CAN_MANAGE"
CAN_RUN = "CAN_RUN"
CAN_VIEW = "CAN_VIEW"
class databricks.sdk.service.sql.PlansState

Whether plans exist for the execution, or the reason why they are missing

EMPTY = "EMPTY"
EXISTS = "EXISTS"
IGNORED_LARGE_PLANS_SIZE = "IGNORED_LARGE_PLANS_SIZE"
IGNORED_SMALL_DURATION = "IGNORED_SMALL_DURATION"
IGNORED_SPARK_PLAN_TYPE = "IGNORED_SPARK_PLAN_TYPE"
UNKNOWN = "UNKNOWN"
class databricks.sdk.service.sql.Query
can_edit: bool | None = None

Describes whether the authenticated user is allowed to edit the definition of this query.

created_at: str | None = None

The timestamp when this query was created.

data_source_id: str | None = None

Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more].

[Learn more]: https://docs.databricks.com/api/workspace/datasources/list

description: str | None = None

General description that conveys additional information about this query such as usage notes.

id: str | None = None

Query ID.

is_archived: bool | None = None

Indicates whether the query is trashed. Trashed queries can’t be used in dashboards, or appear in search results. If this boolean is true, the options property for this query includes a moved_to_trash_at timestamp. Trashed queries are permanently deleted after 30 days.

is_draft: bool | None = None

Whether the query is a draft. Draft queries only appear in list views for their owners. Visualizations from draft queries cannot appear on dashboards.

is_favorite: bool | None = None

Whether this query object appears in the current user’s favorites list. This flag determines whether the star icon for favorites is selected.

is_safe: bool | None = None

Text parameter types are not safe from SQL injection for all types of data source. Set this Boolean parameter to true if a query either does not use any text type parameters or uses a data source type where text type parameters are handled safely.

last_modified_by: User | None = None
last_modified_by_id: int | None = None

The ID of the user who last saved changes to this query.

latest_query_data_id: str | None = None

If there is a cached result for this query and user, this field includes the query result ID. If this query uses parameters, this field is always null.

name: str | None = None

The title of this query that appears in list views, widget headings, and on the query page.

options: QueryOptions | None = None
parent: str | None = None

The identifier of the workspace folder containing the object.

permission_tier: PermissionLevel | None = None
  • CAN_VIEW: Can view the query * CAN_RUN: Can run the query * CAN_EDIT: Can edit the query

  • CAN_MANAGE: Can manage the query

query: str | None = None

The text of the query to be run.

query_hash: str | None = None

A SHA-256 hash of the query text along with the authenticated user ID.

run_as_role: RunAsRole | None = None

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

tags: List[str] | None = None
updated_at: str | None = None

The timestamp at which this query was last updated.

user: User | None = None
user_id: int | None = None

The ID of the user who owns the query.

visualizations: List[Visualization] | None = None
as_dict() dict

Serializes the Query into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Query

Deserializes the Query from a dictionary.

class databricks.sdk.service.sql.QueryEditContent
data_source_id: str | None = None

Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more].

[Learn more]: https://docs.databricks.com/api/workspace/datasources/list

description: str | None = None

General description that conveys additional information about this query such as usage notes.

name: str | None = None

The title of this query that appears in list views, widget headings, and on the query page.

options: Any | None = None

Exclusively used for storing a list parameter definitions. A parameter is an object with title, name, type, and value properties. The value field here is the default value. It can be overridden at runtime.

query: str | None = None

The text of the query to be run.

query_id: str | None = None
run_as_role: RunAsRole | None = None

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

tags: List[str] | None = None
as_dict() dict

Serializes the QueryEditContent into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryEditContent

Deserializes the QueryEditContent from a dictionary.

class databricks.sdk.service.sql.QueryFilter

A filter to limit query history results. This field is optional.

query_start_time_range: TimeRange | None = None
statement_ids: List[str] | None = None

A list of statement IDs.

statuses: List[QueryStatus] | None = None
user_ids: List[int] | None = None

A list of user IDs who ran the queries.

warehouse_ids: List[str] | None = None

A list of warehouse IDs.

as_dict() dict

Serializes the QueryFilter into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryFilter

Deserializes the QueryFilter from a dictionary.

class databricks.sdk.service.sql.QueryInfo
can_subscribe_to_live_query: bool | None = None

Reserved for internal use.

channel_used: ChannelInfo | None = None

Channel information for the SQL warehouse at the time of query execution

duration: int | None = None

Total execution time of the query from the client’s point of view, in milliseconds.

endpoint_id: str | None = None

Alias for warehouse_id.

error_message: str | None = None

Message describing why the query could not complete.

executed_as_user_id: int | None = None

The ID of the user whose credentials were used to run the query.

executed_as_user_name: str | None = None

The email address or username of the user whose credentials were used to run the query.

execution_end_time_ms: int | None = None

The time execution of the query ended.

is_final: bool | None = None

Whether more updates for the query are expected.

lookup_key: str | None = None

A key that can be used to look up query details.

metrics: QueryMetrics | None = None

Metrics about query execution.

plans_state: PlansState | None = None

Whether plans exist for the execution, or the reason why they are missing

query_end_time_ms: int | None = None

The time the query ended.

query_id: str | None = None

The query ID.

query_start_time_ms: int | None = None

The time the query started.

query_text: str | None = None

The text of the query.

rows_produced: int | None = None

The number of results returned by the query.

spark_ui_url: str | None = None

URL to the query plan.

statement_type: QueryStatementType | None = None

Type of statement for this query

status: QueryStatus | None = None

Query status with one the following values: * QUEUED: Query has been received and queued. * RUNNING: Query has started. * CANCELED: Query has been cancelled by the user. * FAILED: Query has failed. * FINISHED: Query has completed.

user_id: int | None = None

The ID of the user who ran the query.

user_name: str | None = None

The email address or username of the user who ran the query.

warehouse_id: str | None = None

Warehouse ID.

as_dict() dict

Serializes the QueryInfo into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryInfo

Deserializes the QueryInfo from a dictionary.

class databricks.sdk.service.sql.QueryList
count: int | None = None

The total number of queries.

page: int | None = None

The page number that is currently displayed.

page_size: int | None = None

The number of queries per page.

results: List[Query] | None = None

List of queries returned.

as_dict() dict

Serializes the QueryList into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryList

Deserializes the QueryList from a dictionary.

class databricks.sdk.service.sql.QueryMetrics

Metrics about query execution.

compilation_time_ms: int | None = None

Time spent loading metadata and optimizing the query, in milliseconds.

execution_time_ms: int | None = None

Time spent executing the query, in milliseconds.

metadata_time_ms: int | None = None

Reserved for internal use.

network_sent_bytes: int | None = None

Total amount of data sent over the network between executor nodes during shuffle, in bytes.

overloading_queue_start_timestamp: int | None = None

Timestamp of when the query was enqueued waiting while the warehouse was at max load. This field is optional and will not appear if the query skipped the overloading queue.

photon_total_time_ms: int | None = None

Total execution time for all individual Photon query engine tasks in the query, in milliseconds.

planning_time_ms: int | None = None

Reserved for internal use.

provisioning_queue_start_timestamp: int | None = None

Timestamp of when the query was enqueued waiting for a cluster to be provisioned for the warehouse. This field is optional and will not appear if the query skipped the provisioning queue.

pruned_bytes: int | None = None

Total number of bytes in all tables not read due to pruning

pruned_files_count: int | None = None

Total number of files from all tables not read due to pruning

query_compilation_start_timestamp: int | None = None

Timestamp of when the underlying compute started compilation of the query.

query_execution_time_ms: int | None = None

Reserved for internal use.

read_bytes: int | None = None

Total size of data read by the query, in bytes.

read_cache_bytes: int | None = None

Size of persistent data read from the cache, in bytes.

read_files_count: int | None = None

Number of files read after pruning.

read_partitions_count: int | None = None

Number of partitions read after pruning.

read_remote_bytes: int | None = None

Size of persistent data read from cloud object storage on your cloud tenant, in bytes.

result_fetch_time_ms: int | None = None

Time spent fetching the query results after the execution finished, in milliseconds.

result_from_cache: bool | None = None

true if the query result was fetched from cache, false otherwise.

rows_produced_count: int | None = None

Total number of rows returned by the query.

rows_read_count: int | None = None

Total number of rows read by the query.

spill_to_disk_bytes: int | None = None

Size of data temporarily written to disk while executing the query, in bytes.

task_total_time_ms: int | None = None

Sum of execution time for all of the query’s tasks, in milliseconds.

total_time_ms: int | None = None

Total execution time of the query from the client’s point of view, in milliseconds.

write_remote_bytes: int | None = None

Size pf persistent data written to cloud object storage in your cloud tenant, in bytes.

as_dict() dict

Serializes the QueryMetrics into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryMetrics

Deserializes the QueryMetrics from a dictionary.

class databricks.sdk.service.sql.QueryOptions
catalog: str | None = None

The name of the catalog to execute this query in.

moved_to_trash_at: str | None = None

The timestamp when this query was moved to trash. Only present when the is_archived property is true. Trashed items are deleted after thirty days.

parameters: List[Parameter] | None = None
schema: str | None = None

The name of the schema to execute this query in.

as_dict() dict

Serializes the QueryOptions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryOptions

Deserializes the QueryOptions from a dictionary.

class databricks.sdk.service.sql.QueryPostContent
data_source_id: str | None = None

Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more].

[Learn more]: https://docs.databricks.com/api/workspace/datasources/list

description: str | None = None

General description that conveys additional information about this query such as usage notes.

name: str | None = None

The title of this query that appears in list views, widget headings, and on the query page.

options: Any | None = None

Exclusively used for storing a list parameter definitions. A parameter is an object with title, name, type, and value properties. The value field here is the default value. It can be overridden at runtime.

parent: str | None = None

The identifier of the workspace folder containing the object.

query: str | None = None

The text of the query to be run.

run_as_role: RunAsRole | None = None

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

tags: List[str] | None = None
as_dict() dict

Serializes the QueryPostContent into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) QueryPostContent

Deserializes the QueryPostContent from a dictionary.

class databricks.sdk.service.sql.QueryStatementType

Type of statement for this query

ALTER = "ALTER"
ANALYZE = "ANALYZE"
COPY = "COPY"
CREATE = "CREATE"
DELETE = "DELETE"
DESCRIBE = "DESCRIBE"
DROP = "DROP"
EXPLAIN = "EXPLAIN"
GRANT = "GRANT"
INSERT = "INSERT"
MERGE = "MERGE"
OPTIMIZE = "OPTIMIZE"
OTHER = "OTHER"
REFRESH = "REFRESH"
REPLACE = "REPLACE"
REVOKE = "REVOKE"
SELECT = "SELECT"
SET = "SET"
SHOW = "SHOW"
TRUNCATE = "TRUNCATE"
UPDATE = "UPDATE"
USE = "USE"
class databricks.sdk.service.sql.QueryStatus

Query status with one the following values: * QUEUED: Query has been received and queued. * RUNNING: Query has started. * CANCELED: Query has been cancelled by the user. * FAILED: Query has failed. * FINISHED: Query has completed.

CANCELED = "CANCELED"
FAILED = "FAILED"
FINISHED = "FINISHED"
QUEUED = "QUEUED"
RUNNING = "RUNNING"
class databricks.sdk.service.sql.RepeatedEndpointConfPairs
config_pair: List[EndpointConfPair] | None = None

Deprecated: Use configuration_pairs

configuration_pairs: List[EndpointConfPair] | None = None
as_dict() dict

Serializes the RepeatedEndpointConfPairs into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) RepeatedEndpointConfPairs

Deserializes the RepeatedEndpointConfPairs from a dictionary.

class databricks.sdk.service.sql.RestoreResponse
as_dict() dict

Serializes the RestoreResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) RestoreResponse

Deserializes the RestoreResponse from a dictionary.

class databricks.sdk.service.sql.ResultData

Contains the result data of a single chunk when using INLINE disposition. When using EXTERNAL_LINKS disposition, the array external_links is used instead to provide presigned URLs to the result data in cloud storage. Exactly one of these alternatives is used. (While the external_links array prepares the API to return multiple links in a single response. Currently only a single link is returned.)

byte_count: int | None = None

The number of bytes in the result chunk. This field is not available when using INLINE disposition.

chunk_index: int | None = None

The position within the sequence of result set chunks.

data_array: List[List[str]] | None = None

The JSON_ARRAY format is an array of arrays of values, where each non-null value is formatted as a string. Null values are encoded as JSON null.

next_chunk_index: int | None = None

When fetching, provides the chunk_index for the _next_ chunk. If absent, indicates there are no more chunks. The next chunk can be fetched with a :method:statementexecution/getStatementResultChunkN request.

When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more chunks. This link is an absolute path to be joined with your $DATABRICKS_HOST, and should be treated as an opaque link. This is an alternative to using next_chunk_index.

row_count: int | None = None

The number of rows within the result chunk.

row_offset: int | None = None

The starting row offset within the result set.

as_dict() dict

Serializes the ResultData into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ResultData

Deserializes the ResultData from a dictionary.

class databricks.sdk.service.sql.ResultManifest

The result manifest provides schema and metadata for the result set.

chunks: List[BaseChunkInfo] | None = None

Array of result set chunk metadata.

format: Format | None = None
schema: ResultSchema | None = None

The schema is an ordered list of column descriptions.

total_byte_count: int | None = None

The total number of bytes in the result set. This field is not available when using INLINE disposition.

total_chunk_count: int | None = None

The total number of chunks that the result set has been divided into.

total_row_count: int | None = None

The total number of rows in the result set.

truncated: bool | None = None

Indicates whether the result is truncated due to row_limit or byte_limit.

as_dict() dict

Serializes the ResultManifest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ResultManifest

Deserializes the ResultManifest from a dictionary.

class databricks.sdk.service.sql.ResultSchema

The schema is an ordered list of column descriptions.

column_count: int | None = None
columns: List[ColumnInfo] | None = None
as_dict() dict

Serializes the ResultSchema into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ResultSchema

Deserializes the ResultSchema from a dictionary.

class databricks.sdk.service.sql.RunAsRole

Sets the Run as role for the object. Must be set to one of “viewer” (signifying “run as viewer” behavior) or “owner” (signifying “run as owner” behavior)

OWNER = "OWNER"
VIEWER = "VIEWER"
class databricks.sdk.service.sql.ServiceError
error_code: ServiceErrorCode | None = None
message: str | None = None

A brief summary of the error condition.

as_dict() dict

Serializes the ServiceError into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) ServiceError

Deserializes the ServiceError from a dictionary.

class databricks.sdk.service.sql.ServiceErrorCode
ABORTED = "ABORTED"
ALREADY_EXISTS = "ALREADY_EXISTS"
BAD_REQUEST = "BAD_REQUEST"
CANCELLED = "CANCELLED"
DEADLINE_EXCEEDED = "DEADLINE_EXCEEDED"
INTERNAL_ERROR = "INTERNAL_ERROR"
IO_ERROR = "IO_ERROR"
NOT_FOUND = "NOT_FOUND"
RESOURCE_EXHAUSTED = "RESOURCE_EXHAUSTED"
SERVICE_UNDER_MAINTENANCE = "SERVICE_UNDER_MAINTENANCE"
TEMPORARILY_UNAVAILABLE = "TEMPORARILY_UNAVAILABLE"
UNAUTHENTICATED = "UNAUTHENTICATED"
UNKNOWN = "UNKNOWN"
WORKSPACE_TEMPORARILY_UNAVAILABLE = "WORKSPACE_TEMPORARILY_UNAVAILABLE"
class databricks.sdk.service.sql.SetResponse
access_control_list: List[AccessControl] | None = None
object_id: str | None = None

An object’s type and UUID, separated by a forward slash (/) character.

object_type: ObjectType | None = None

A singular noun object type.

as_dict() dict

Serializes the SetResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) SetResponse

Deserializes the SetResponse from a dictionary.

class databricks.sdk.service.sql.SetWorkspaceWarehouseConfigRequest
channel: Channel | None = None

Optional: Channel selection details

config_param: RepeatedEndpointConfPairs | None = None

Deprecated: Use sql_configuration_parameters

data_access_config: List[EndpointConfPair] | None = None

Spark confs for external hive metastore configuration JSON serialized size must be less than <= 512K

enabled_warehouse_types: List[WarehouseTypePair] | None = None

List of Warehouse Types allowed in this workspace (limits allowed value of the type field in CreateWarehouse and EditWarehouse). Note: Some types cannot be disabled, they don’t need to be specified in SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing warehouses to be converted to another type. Used by frontend to save specific type availability in the warehouse create and edit form UI.

global_param: RepeatedEndpointConfPairs | None = None

Deprecated: Use sql_configuration_parameters

google_service_account: str | None = None

GCP only: Google Service Account used to pass to cluster to access Google Cloud Storage

instance_profile_arn: str | None = None

AWS Only: Instance profile used to pass IAM role to the cluster

security_policy: SetWorkspaceWarehouseConfigRequestSecurityPolicy | None = None

Security policy for warehouses

sql_configuration_parameters: RepeatedEndpointConfPairs | None = None

SQL configuration parameters

as_dict() dict

Serializes the SetWorkspaceWarehouseConfigRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) SetWorkspaceWarehouseConfigRequest

Deserializes the SetWorkspaceWarehouseConfigRequest from a dictionary.

class databricks.sdk.service.sql.SetWorkspaceWarehouseConfigRequestSecurityPolicy

Security policy for warehouses

DATA_ACCESS_CONTROL = "DATA_ACCESS_CONTROL"
NONE = "NONE"
PASSTHROUGH = "PASSTHROUGH"
class databricks.sdk.service.sql.SetWorkspaceWarehouseConfigResponse
as_dict() dict

Serializes the SetWorkspaceWarehouseConfigResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) SetWorkspaceWarehouseConfigResponse

Deserializes the SetWorkspaceWarehouseConfigResponse from a dictionary.

class databricks.sdk.service.sql.SpotInstancePolicy

Configurations whether the warehouse should use spot instances.

COST_OPTIMIZED = "COST_OPTIMIZED"
POLICY_UNSPECIFIED = "POLICY_UNSPECIFIED"
RELIABILITY_OPTIMIZED = "RELIABILITY_OPTIMIZED"
class databricks.sdk.service.sql.StartWarehouseResponse
as_dict() dict

Serializes the StartWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) StartWarehouseResponse

Deserializes the StartWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.State

State of the warehouse

DELETED = "DELETED"
DELETING = "DELETING"
RUNNING = "RUNNING"
STARTING = "STARTING"
STOPPED = "STOPPED"
STOPPING = "STOPPING"
class databricks.sdk.service.sql.StatementParameterListItem
name: str

The name of a parameter marker to be substituted in the statement.

type: str | None = None

The data type, given as a string. For example: INT, STRING, DECIMAL(10,2). If no type is given the type is assumed to be STRING. Complex types, such as ARRAY, MAP, and STRUCT are not supported. For valid types, refer to the section [Data types](/sql/language-manual/functions/cast.html) of the SQL language reference.

value: str | None = None

The value to substitute, represented as a string. If omitted, the value is interpreted as NULL.

as_dict() dict

Serializes the StatementParameterListItem into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) StatementParameterListItem

Deserializes the StatementParameterListItem from a dictionary.

class databricks.sdk.service.sql.StatementState

Statement execution state: - PENDING: waiting for warehouse - RUNNING: running - SUCCEEDED: execution was successful, result data available for fetch - FAILED: execution failed; reason for failure described in accomanying error message - CANCELED: user canceled; can come from explicit cancel call, or timeout with on_wait_timeout=CANCEL - CLOSED: execution successful, and statement closed; result no longer available for fetch

CANCELED = "CANCELED"
CLOSED = "CLOSED"
FAILED = "FAILED"
PENDING = "PENDING"
RUNNING = "RUNNING"
SUCCEEDED = "SUCCEEDED"
class databricks.sdk.service.sql.StatementStatus

The status response includes execution state and if relevant, error information.

error: ServiceError | None = None
state: StatementState | None = None

Statement execution state: - PENDING: waiting for warehouse - RUNNING: running - SUCCEEDED: execution was successful, result data available for fetch - FAILED: execution failed; reason for failure described in accomanying error message - CANCELED: user canceled; can come from explicit cancel call, or timeout with on_wait_timeout=CANCEL - CLOSED: execution successful, and statement closed; result no longer available for fetch

as_dict() dict

Serializes the StatementStatus into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) StatementStatus

Deserializes the StatementStatus from a dictionary.

class databricks.sdk.service.sql.Status

Health status of the warehouse.

DEGRADED = "DEGRADED"
FAILED = "FAILED"
HEALTHY = "HEALTHY"
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED"
class databricks.sdk.service.sql.StopWarehouseResponse
as_dict() dict

Serializes the StopWarehouseResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) StopWarehouseResponse

Deserializes the StopWarehouseResponse from a dictionary.

class databricks.sdk.service.sql.Success
message: SuccessMessage | None = None
as_dict() dict

Serializes the Success into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Success

Deserializes the Success from a dictionary.

class databricks.sdk.service.sql.SuccessMessage
SUCCESS = "SUCCESS"
class databricks.sdk.service.sql.TerminationReason
code: TerminationReasonCode | None = None

status code indicating why the cluster was terminated

parameters: Dict[str, str] | None = None

list of parameters that provide additional information about why the cluster was terminated

type: TerminationReasonType | None = None

type of the termination

as_dict() dict

Serializes the TerminationReason into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) TerminationReason

Deserializes the TerminationReason from a dictionary.

class databricks.sdk.service.sql.TerminationReasonCode

status code indicating why the cluster was terminated

ABUSE_DETECTED = "ABUSE_DETECTED"
ATTACH_PROJECT_FAILURE = "ATTACH_PROJECT_FAILURE"
AWS_AUTHORIZATION_FAILURE = "AWS_AUTHORIZATION_FAILURE"
AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE = "AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE"
AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE = "AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE"
AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE = "AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE"
AWS_REQUEST_LIMIT_EXCEEDED = "AWS_REQUEST_LIMIT_EXCEEDED"
AWS_UNSUPPORTED_FAILURE = "AWS_UNSUPPORTED_FAILURE"
AZURE_BYOK_KEY_PERMISSION_FAILURE = "AZURE_BYOK_KEY_PERMISSION_FAILURE"
AZURE_EPHEMERAL_DISK_FAILURE = "AZURE_EPHEMERAL_DISK_FAILURE"
AZURE_INVALID_DEPLOYMENT_TEMPLATE = "AZURE_INVALID_DEPLOYMENT_TEMPLATE"
AZURE_OPERATION_NOT_ALLOWED_EXCEPTION = "AZURE_OPERATION_NOT_ALLOWED_EXCEPTION"
AZURE_QUOTA_EXCEEDED_EXCEPTION = "AZURE_QUOTA_EXCEEDED_EXCEPTION"
AZURE_RESOURCE_MANAGER_THROTTLING = "AZURE_RESOURCE_MANAGER_THROTTLING"
AZURE_RESOURCE_PROVIDER_THROTTLING = "AZURE_RESOURCE_PROVIDER_THROTTLING"
AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE = "AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE"
AZURE_VM_EXTENSION_FAILURE = "AZURE_VM_EXTENSION_FAILURE"
AZURE_VNET_CONFIGURATION_FAILURE = "AZURE_VNET_CONFIGURATION_FAILURE"
BOOTSTRAP_TIMEOUT = "BOOTSTRAP_TIMEOUT"
BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION = "BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION"
CLOUD_PROVIDER_DISK_SETUP_FAILURE = "CLOUD_PROVIDER_DISK_SETUP_FAILURE"
CLOUD_PROVIDER_LAUNCH_FAILURE = "CLOUD_PROVIDER_LAUNCH_FAILURE"
CLOUD_PROVIDER_RESOURCE_STOCKOUT = "CLOUD_PROVIDER_RESOURCE_STOCKOUT"
CLOUD_PROVIDER_SHUTDOWN = "CLOUD_PROVIDER_SHUTDOWN"
COMMUNICATION_LOST = "COMMUNICATION_LOST"
CONTAINER_LAUNCH_FAILURE = "CONTAINER_LAUNCH_FAILURE"
CONTROL_PLANE_REQUEST_FAILURE = "CONTROL_PLANE_REQUEST_FAILURE"
DATABASE_CONNECTION_FAILURE = "DATABASE_CONNECTION_FAILURE"
DBFS_COMPONENT_UNHEALTHY = "DBFS_COMPONENT_UNHEALTHY"
DOCKER_IMAGE_PULL_FAILURE = "DOCKER_IMAGE_PULL_FAILURE"
DRIVER_UNREACHABLE = "DRIVER_UNREACHABLE"
DRIVER_UNRESPONSIVE = "DRIVER_UNRESPONSIVE"
EXECUTION_COMPONENT_UNHEALTHY = "EXECUTION_COMPONENT_UNHEALTHY"
GCP_QUOTA_EXCEEDED = "GCP_QUOTA_EXCEEDED"
GCP_SERVICE_ACCOUNT_DELETED = "GCP_SERVICE_ACCOUNT_DELETED"
GLOBAL_INIT_SCRIPT_FAILURE = "GLOBAL_INIT_SCRIPT_FAILURE"
HIVE_METASTORE_PROVISIONING_FAILURE = "HIVE_METASTORE_PROVISIONING_FAILURE"
IMAGE_PULL_PERMISSION_DENIED = "IMAGE_PULL_PERMISSION_DENIED"
INACTIVITY = "INACTIVITY"
INIT_SCRIPT_FAILURE = "INIT_SCRIPT_FAILURE"
INSTANCE_POOL_CLUSTER_FAILURE = "INSTANCE_POOL_CLUSTER_FAILURE"
INSTANCE_UNREACHABLE = "INSTANCE_UNREACHABLE"
INTERNAL_ERROR = "INTERNAL_ERROR"
INVALID_ARGUMENT = "INVALID_ARGUMENT"
INVALID_SPARK_IMAGE = "INVALID_SPARK_IMAGE"
IP_EXHAUSTION_FAILURE = "IP_EXHAUSTION_FAILURE"
JOB_FINISHED = "JOB_FINISHED"
K8S_AUTOSCALING_FAILURE = "K8S_AUTOSCALING_FAILURE"
K8S_DBR_CLUSTER_LAUNCH_TIMEOUT = "K8S_DBR_CLUSTER_LAUNCH_TIMEOUT"
METASTORE_COMPONENT_UNHEALTHY = "METASTORE_COMPONENT_UNHEALTHY"
NEPHOS_RESOURCE_MANAGEMENT = "NEPHOS_RESOURCE_MANAGEMENT"
NETWORK_CONFIGURATION_FAILURE = "NETWORK_CONFIGURATION_FAILURE"
NFS_MOUNT_FAILURE = "NFS_MOUNT_FAILURE"
NPIP_TUNNEL_SETUP_FAILURE = "NPIP_TUNNEL_SETUP_FAILURE"
NPIP_TUNNEL_TOKEN_FAILURE = "NPIP_TUNNEL_TOKEN_FAILURE"
REQUEST_REJECTED = "REQUEST_REJECTED"
REQUEST_THROTTLED = "REQUEST_THROTTLED"
SECRET_RESOLUTION_ERROR = "SECRET_RESOLUTION_ERROR"
SECURITY_DAEMON_REGISTRATION_EXCEPTION = "SECURITY_DAEMON_REGISTRATION_EXCEPTION"
SELF_BOOTSTRAP_FAILURE = "SELF_BOOTSTRAP_FAILURE"
SKIPPED_SLOW_NODES = "SKIPPED_SLOW_NODES"
SLOW_IMAGE_DOWNLOAD = "SLOW_IMAGE_DOWNLOAD"
SPARK_ERROR = "SPARK_ERROR"
SPARK_IMAGE_DOWNLOAD_FAILURE = "SPARK_IMAGE_DOWNLOAD_FAILURE"
SPARK_STARTUP_FAILURE = "SPARK_STARTUP_FAILURE"
SPOT_INSTANCE_TERMINATION = "SPOT_INSTANCE_TERMINATION"
STORAGE_DOWNLOAD_FAILURE = "STORAGE_DOWNLOAD_FAILURE"
STS_CLIENT_SETUP_FAILURE = "STS_CLIENT_SETUP_FAILURE"
SUBNET_EXHAUSTED_FAILURE = "SUBNET_EXHAUSTED_FAILURE"
TEMPORARILY_UNAVAILABLE = "TEMPORARILY_UNAVAILABLE"
TRIAL_EXPIRED = "TRIAL_EXPIRED"
UNEXPECTED_LAUNCH_FAILURE = "UNEXPECTED_LAUNCH_FAILURE"
UNKNOWN = "UNKNOWN"
UNSUPPORTED_INSTANCE_TYPE = "UNSUPPORTED_INSTANCE_TYPE"
UPDATE_INSTANCE_PROFILE_FAILURE = "UPDATE_INSTANCE_PROFILE_FAILURE"
USER_REQUEST = "USER_REQUEST"
WORKER_SETUP_FAILURE = "WORKER_SETUP_FAILURE"
WORKSPACE_CANCELLED_ERROR = "WORKSPACE_CANCELLED_ERROR"
WORKSPACE_CONFIGURATION_ERROR = "WORKSPACE_CONFIGURATION_ERROR"
class databricks.sdk.service.sql.TerminationReasonType

type of the termination

CLIENT_ERROR = "CLIENT_ERROR"
CLOUD_FAILURE = "CLOUD_FAILURE"
SERVICE_FAULT = "SERVICE_FAULT"
SUCCESS = "SUCCESS"
class databricks.sdk.service.sql.TimeRange
end_time_ms: int | None = None

Limit results to queries that started before this time.

start_time_ms: int | None = None

Limit results to queries that started after this time.

as_dict() dict

Serializes the TimeRange into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) TimeRange

Deserializes the TimeRange from a dictionary.

class databricks.sdk.service.sql.TransferOwnershipObjectId
new_owner: str | None = None

Email address for the new owner, who must exist in the workspace.

as_dict() dict

Serializes the TransferOwnershipObjectId into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) TransferOwnershipObjectId

Deserializes the TransferOwnershipObjectId from a dictionary.

class databricks.sdk.service.sql.UpdateResponse
as_dict() dict

Serializes the UpdateResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) UpdateResponse

Deserializes the UpdateResponse from a dictionary.

class databricks.sdk.service.sql.User
email: str | None = None
id: int | None = None
name: str | None = None
as_dict() dict

Serializes the User into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) User

Deserializes the User from a dictionary.

class databricks.sdk.service.sql.Visualization

The visualization description API changes frequently and is unsupported. You can duplicate a visualization by copying description objects received _from the API_ and then using them to create a new one with a POST request to the same endpoint. Databricks does not recommend constructing ad-hoc visualizations entirely in JSON.

created_at: str | None = None
description: str | None = None

A short description of this visualization. This is not displayed in the UI.

id: str | None = None

The UUID for this visualization.

name: str | None = None

The name of the visualization that appears on dashboards and the query screen.

options: Any | None = None

The options object varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying visualization settings in JSON.

query: Query | None = None
type: str | None = None

The type of visualization: chart, table, pivot table, and so on.

updated_at: str | None = None
as_dict() dict

Serializes the Visualization into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Visualization

Deserializes the Visualization from a dictionary.

class databricks.sdk.service.sql.WarehouseAccessControlRequest
group_name: str | None = None

name of the group

permission_level: WarehousePermissionLevel | None = None

Permission level

service_principal_name: str | None = None

application ID of a service principal

user_name: str | None = None

name of the user

as_dict() dict

Serializes the WarehouseAccessControlRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehouseAccessControlRequest

Deserializes the WarehouseAccessControlRequest from a dictionary.

class databricks.sdk.service.sql.WarehouseAccessControlResponse
all_permissions: List[WarehousePermission] | None = None

All permissions.

display_name: str | None = None

Display name of the user or service principal.

group_name: str | None = None

name of the group

service_principal_name: str | None = None

Name of the service principal.

user_name: str | None = None

name of the user

as_dict() dict

Serializes the WarehouseAccessControlResponse into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehouseAccessControlResponse

Deserializes the WarehouseAccessControlResponse from a dictionary.

class databricks.sdk.service.sql.WarehousePermission
inherited: bool | None = None
inherited_from_object: List[str] | None = None
permission_level: WarehousePermissionLevel | None = None

Permission level

as_dict() dict

Serializes the WarehousePermission into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehousePermission

Deserializes the WarehousePermission from a dictionary.

class databricks.sdk.service.sql.WarehousePermissionLevel

Permission level

CAN_MANAGE = "CAN_MANAGE"
CAN_USE = "CAN_USE"
IS_OWNER = "IS_OWNER"
class databricks.sdk.service.sql.WarehousePermissions
access_control_list: List[WarehouseAccessControlResponse] | None = None
object_id: str | None = None
object_type: str | None = None
as_dict() dict

Serializes the WarehousePermissions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehousePermissions

Deserializes the WarehousePermissions from a dictionary.

class databricks.sdk.service.sql.WarehousePermissionsDescription
description: str | None = None
permission_level: WarehousePermissionLevel | None = None

Permission level

as_dict() dict

Serializes the WarehousePermissionsDescription into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehousePermissionsDescription

Deserializes the WarehousePermissionsDescription from a dictionary.

class databricks.sdk.service.sql.WarehousePermissionsRequest
access_control_list: List[WarehouseAccessControlRequest] | None = None
warehouse_id: str | None = None

The SQL warehouse for which to get or manage permissions.

as_dict() dict

Serializes the WarehousePermissionsRequest into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehousePermissionsRequest

Deserializes the WarehousePermissionsRequest from a dictionary.

class databricks.sdk.service.sql.WarehouseTypePair
enabled: bool | None = None

If set to false the specific warehouse type will not be be allowed as a value for warehouse_type in CreateWarehouse and EditWarehouse

warehouse_type: WarehouseTypePairWarehouseType | None = None

Warehouse type: PRO or CLASSIC.

as_dict() dict

Serializes the WarehouseTypePair into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WarehouseTypePair

Deserializes the WarehouseTypePair from a dictionary.

class databricks.sdk.service.sql.WarehouseTypePairWarehouseType

Warehouse type: PRO or CLASSIC.

CLASSIC = "CLASSIC"
PRO = "PRO"
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED"
class databricks.sdk.service.sql.Widget
id: str | None = None

The unique ID for this widget.

options: WidgetOptions | None = None
visualization: Visualization | None = None

The visualization description API changes frequently and is unsupported. You can duplicate a visualization by copying description objects received _from the API_ and then using them to create a new one with a POST request to the same endpoint. Databricks does not recommend constructing ad-hoc visualizations entirely in JSON.

width: int | None = None

Unused field.

as_dict() dict

Serializes the Widget into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) Widget

Deserializes the Widget from a dictionary.

class databricks.sdk.service.sql.WidgetOptions
created_at: str | None = None

Timestamp when this object was created

description: str | None = None

Custom description of the widget

is_hidden: bool | None = None

Whether this widget is hidden on the dashboard.

parameter_mappings: Any | None = None

How parameters used by the visualization in this widget relate to other widgets on the dashboard. Databricks does not recommend modifying this definition in JSON.

position: WidgetPosition | None = None

Coordinates of this widget on a dashboard. This portion of the API changes frequently and is unsupported.

title: str | None = None

Custom title of the widget

updated_at: str | None = None

Timestamp of the last time this object was updated.

as_dict() dict

Serializes the WidgetOptions into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WidgetOptions

Deserializes the WidgetOptions from a dictionary.

class databricks.sdk.service.sql.WidgetPosition

Coordinates of this widget on a dashboard. This portion of the API changes frequently and is unsupported.

auto_height: bool | None = None

reserved for internal use

col: int | None = None

column in the dashboard grid. Values start with 0

row: int | None = None

row in the dashboard grid. Values start with 0

size_x: int | None = None

width of the widget measured in dashboard grid cells

size_y: int | None = None

height of the widget measured in dashboard grid cells

as_dict() dict

Serializes the WidgetPosition into a dictionary suitable for use as a JSON request body.

classmethod from_dict(d: Dict[str, any]) WidgetPosition

Deserializes the WidgetPosition from a dictionary.