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.
- as_shallow_dict() dict ¶
Serializes the AccessControl into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AccessControl ¶
Deserializes the AccessControl from a dictionary.
- class databricks.sdk.service.sql.Aggregation¶
- AVG = "AVG"¶
- COUNT = "COUNT"¶
- COUNT_DISTINCT = "COUNT_DISTINCT"¶
- MAX = "MAX"¶
- MEDIAN = "MEDIAN"¶
- MIN = "MIN"¶
- STDDEV = "STDDEV"¶
- SUM = "SUM"¶
- class databricks.sdk.service.sql.Alert¶
- condition: AlertCondition | None = None¶
Trigger conditions of the alert.
- create_time: str | None = None¶
The timestamp indicating when the alert was created.
- 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 can include email subject entries and Slack notification headers, for example. See [here] for custom templating instructions.
[here]: https://docs.databricks.com/sql/user/alerts/index.html
- display_name: str | None = None¶
The display name of the alert.
- id: str | None = None¶
UUID identifying the alert.
- lifecycle_state: LifecycleState | None = None¶
The workspace state of the alert. Used for tracking trashed status.
- notify_on_ok: bool | None = None¶
Whether to notify alert subscribers when alert returns back to normal.
- owner_user_name: str | None = None¶
The owner’s username. This field is set to “Unavailable” if the user has been deleted.
- parent_path: str | None = None¶
The workspace path of the folder containing the alert.
- query_id: str | None = None¶
UUID of the query attached to the alert.
- seconds_to_retrigger: int | None = None¶
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
- state: AlertState | None = None¶
Current state of the alert’s trigger status. This field is set to UNKNOWN if the alert has not yet been evaluated or ran into an error during the last evaluation.
- trigger_time: str | None = None¶
Timestamp when the alert was last triggered, if the alert has been triggered before.
- update_time: str | None = None¶
The timestamp indicating when the alert was updated.
- as_dict() dict ¶
Serializes the Alert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the Alert into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.AlertCondition¶
- empty_result_state: AlertState | None = None¶
Alert state if result is empty.
- op: AlertOperator | None = None¶
Operator used for comparison in alert evaluation.
- operand: AlertConditionOperand | None = None¶
Name of the column from the query result to use for comparison in alert evaluation.
- threshold: AlertConditionThreshold | None = None¶
Threshold value used for comparison in alert evaluation.
- as_dict() dict ¶
Serializes the AlertCondition into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertCondition into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertCondition ¶
Deserializes the AlertCondition from a dictionary.
- class databricks.sdk.service.sql.AlertConditionOperand¶
- column: AlertOperandColumn | None = None¶
- as_dict() dict ¶
Serializes the AlertConditionOperand into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertConditionOperand into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertConditionOperand ¶
Deserializes the AlertConditionOperand from a dictionary.
- class databricks.sdk.service.sql.AlertConditionThreshold¶
- value: AlertOperandValue | None = None¶
- as_dict() dict ¶
Serializes the AlertConditionThreshold into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertConditionThreshold into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertConditionThreshold ¶
Deserializes the AlertConditionThreshold from a dictionary.
- class databricks.sdk.service.sql.AlertEvaluationState¶
UNSPECIFIED - default unspecify value for proto enum, do not use it in the code UNKNOWN - alert not yet evaluated TRIGGERED - alert is triggered OK - alert is not triggered ERROR - alert evaluation failed
- ERROR = "ERROR"¶
- OK = "OK"¶
- TRIGGERED = "TRIGGERED"¶
- UNKNOWN = "UNKNOWN"¶
- class databricks.sdk.service.sql.AlertOperandColumn¶
- name: str | None = None¶
- as_dict() dict ¶
Serializes the AlertOperandColumn into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertOperandColumn into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertOperandColumn ¶
Deserializes the AlertOperandColumn from a dictionary.
- class databricks.sdk.service.sql.AlertOperandValue¶
- bool_value: bool | None = None¶
- double_value: float | None = None¶
- string_value: str | None = None¶
- as_dict() dict ¶
Serializes the AlertOperandValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertOperandValue into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertOperandValue ¶
Deserializes the AlertOperandValue from a dictionary.
- class databricks.sdk.service.sql.AlertOperator¶
- EQUAL = "EQUAL"¶
- GREATER_THAN = "GREATER_THAN"¶
- GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL"¶
- IS_NULL = "IS_NULL"¶
- LESS_THAN = "LESS_THAN"¶
- LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL"¶
- NOT_EQUAL = "NOT_EQUAL"¶
- 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.
- as_shallow_dict() dict ¶
Serializes the AlertOptions into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the AlertQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertQuery ¶
Deserializes the AlertQuery from a dictionary.
- class databricks.sdk.service.sql.AlertState¶
- OK = "OK"¶
- TRIGGERED = "TRIGGERED"¶
- UNKNOWN = "UNKNOWN"¶
- class databricks.sdk.service.sql.AlertV2¶
- create_time: str | None = None¶
The timestamp indicating when the alert was created.
- custom_description: str | None = None¶
Custom description for the alert. support mustache template.
- custom_summary: str | None = None¶
Custom summary for the alert. support mustache template.
- display_name: str | None = None¶
The display name of the alert.
- evaluation: AlertV2Evaluation | None = None¶
- id: str | None = None¶
UUID identifying the alert.
- lifecycle_state: LifecycleState | None = None¶
Indicates whether the query is trashed.
- owner_user_name: str | None = None¶
The owner’s username. This field is set to “Unavailable” if the user has been deleted.
- parent_path: str | None = None¶
The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.
- query_text: str | None = None¶
Text of the query to be run.
- run_as_user_name: str | None = None¶
The run as username. This field is set to “Unavailable” if the user has been deleted.
- schedule: CronSchedule | None = None¶
- update_time: str | None = None¶
The timestamp indicating when the alert was updated.
- warehouse_id: str | None = None¶
ID of the SQL warehouse attached to the alert.
- as_dict() dict ¶
Serializes the AlertV2 into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2 into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.AlertV2Evaluation¶
- comparison_operator: ComparisonOperator | None = None¶
Operator used for comparison in alert evaluation.
- empty_result_state: AlertEvaluationState | None = None¶
Alert state if result is empty.
- last_evaluated_at: str | None = None¶
Timestamp of the last evaluation.
- notification: AlertV2Notification | None = None¶
User or Notification Destination to notify when alert is triggered.
- source: AlertV2OperandColumn | None = None¶
Source column from result to use to evaluate alert
- state: AlertEvaluationState | None = None¶
Latest state of alert evaluation.
- threshold: AlertV2Operand | None = None¶
Threshold to user for alert evaluation, can be a column or a value.
- as_dict() dict ¶
Serializes the AlertV2Evaluation into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2Evaluation into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2Evaluation ¶
Deserializes the AlertV2Evaluation from a dictionary.
- class databricks.sdk.service.sql.AlertV2Notification¶
- notify_on_ok: bool | None = None¶
Whether to notify alert subscribers when alert returns back to normal.
- retrigger_seconds: int | None = None¶
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
- subscriptions: List[AlertV2Subscription] | None = None¶
- as_dict() dict ¶
Serializes the AlertV2Notification into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2Notification into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2Notification ¶
Deserializes the AlertV2Notification from a dictionary.
- class databricks.sdk.service.sql.AlertV2Operand¶
- column: AlertV2OperandColumn | None = None¶
- value: AlertV2OperandValue | None = None¶
- as_dict() dict ¶
Serializes the AlertV2Operand into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2Operand into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2Operand ¶
Deserializes the AlertV2Operand from a dictionary.
- class databricks.sdk.service.sql.AlertV2OperandColumn¶
- aggregation: Aggregation | None = None¶
- display: str | None = None¶
- name: str | None = None¶
- as_dict() dict ¶
Serializes the AlertV2OperandColumn into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2OperandColumn into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2OperandColumn ¶
Deserializes the AlertV2OperandColumn from a dictionary.
- class databricks.sdk.service.sql.AlertV2OperandValue¶
- bool_value: bool | None = None¶
- double_value: float | None = None¶
- string_value: str | None = None¶
- as_dict() dict ¶
Serializes the AlertV2OperandValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2OperandValue into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2OperandValue ¶
Deserializes the AlertV2OperandValue from a dictionary.
- class databricks.sdk.service.sql.AlertV2Subscription¶
- destination_id: str | None = None¶
- user_email: str | None = None¶
- as_dict() dict ¶
Serializes the AlertV2Subscription into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the AlertV2Subscription into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertV2Subscription ¶
Deserializes the AlertV2Subscription from a dictionary.
- 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.
- as_shallow_dict() dict ¶
Serializes the BaseChunkInfo into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the CancelExecutionResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CancelExecutionResponse ¶
Deserializes the CancelExecutionResponse from a dictionary.
- class databricks.sdk.service.sql.Channel¶
Configures the channel name and DBSQL version of the warehouse. CHANNEL_NAME_CUSTOM should be chosen only when dbsql_version is specified.
- 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.
- as_shallow_dict() dict ¶
Serializes the Channel into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.ChannelInfo¶
Details about a Channel.
- dbsql_version: str | None = None¶
DB SQL 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.
- as_shallow_dict() dict ¶
Serializes the ChannelInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ChannelInfo ¶
Deserializes the ChannelInfo from a dictionary.
- class databricks.sdk.service.sql.ChannelName¶
- CHANNEL_NAME_CURRENT = "CHANNEL_NAME_CURRENT"¶
- CHANNEL_NAME_CUSTOM = "CHANNEL_NAME_CUSTOM"¶
- CHANNEL_NAME_PREVIEW = "CHANNEL_NAME_PREVIEW"¶
- CHANNEL_NAME_PREVIOUS = "CHANNEL_NAME_PREVIOUS"¶
- class databricks.sdk.service.sql.ClientConfig¶
- allow_custom_js_visualizations: bool | None = None¶
- allow_downloads: bool | None = None¶
- allow_subscriptions: bool | None = None¶
- date_format: str | None = None¶
- date_time_format: str | None = None¶
- disable_publish: bool | None = None¶
- enable_legacy_autodetect_types: bool | None = None¶
- feature_show_permissions_control: bool | None = None¶
- hide_plotly_mode_bar: bool | None = None¶
- as_dict() dict ¶
Serializes the ClientConfig into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ClientConfig into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ClientConfig ¶
Deserializes the ClientConfig from a dictionary.
- 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.
- as_shallow_dict() dict ¶
Serializes the ColumnInfo into a shallow dictionary of its immediate attributes.
- 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.ComparisonOperator¶
- EQUAL = "EQUAL"¶
- GREATER_THAN = "GREATER_THAN"¶
- GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL"¶
- IS_NOT_NULL = "IS_NOT_NULL"¶
- IS_NULL = "IS_NULL"¶
- LESS_THAN = "LESS_THAN"¶
- LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL"¶
- NOT_EQUAL = "NOT_EQUAL"¶
- 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.
- as_shallow_dict() dict ¶
Serializes the CreateAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateAlert ¶
Deserializes the CreateAlert from a dictionary.
- class databricks.sdk.service.sql.CreateAlertRequest¶
- alert: CreateAlertRequestAlert | None = None¶
- auto_resolve_display_name: bool | None = None¶
If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert’s display name conflicts with an existing alert’s display name.
- as_dict() dict ¶
Serializes the CreateAlertRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateAlertRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateAlertRequest ¶
Deserializes the CreateAlertRequest from a dictionary.
- class databricks.sdk.service.sql.CreateAlertRequestAlert¶
- condition: AlertCondition | None = None¶
Trigger conditions of the alert.
- 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 can include email subject entries and Slack notification headers, for example. See [here] for custom templating instructions.
[here]: https://docs.databricks.com/sql/user/alerts/index.html
- display_name: str | None = None¶
The display name of the alert.
- notify_on_ok: bool | None = None¶
Whether to notify alert subscribers when alert returns back to normal.
- parent_path: str | None = None¶
The workspace path of the folder containing the alert.
- query_id: str | None = None¶
UUID of the query attached to the alert.
- seconds_to_retrigger: int | None = None¶
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
- as_dict() dict ¶
Serializes the CreateAlertRequestAlert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateAlertRequestAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateAlertRequestAlert ¶
Deserializes the CreateAlertRequestAlert from a dictionary.
- class databricks.sdk.service.sql.CreateQueryRequest¶
- auto_resolve_display_name: bool | None = None¶
If true, automatically resolve query display name conflicts. Otherwise, fail the request if the query’s display name conflicts with an existing query’s display name.
- query: CreateQueryRequestQuery | None = None¶
- as_dict() dict ¶
Serializes the CreateQueryRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateQueryRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateQueryRequest ¶
Deserializes the CreateQueryRequest from a dictionary.
- class databricks.sdk.service.sql.CreateQueryRequestQuery¶
- apply_auto_limit: bool | None = None¶
Whether to apply a 1000 row limit to the query result.
- catalog: str | None = None¶
Name of the catalog where this query will be executed.
- description: str | None = None¶
General description that conveys additional information about this query such as usage notes.
- display_name: str | None = None¶
Display name of the query that appears in list views, widget headings, and on the query page.
- parameters: List[QueryParameter] | None = None¶
List of query parameter definitions.
- parent_path: str | None = None¶
Workspace path of the workspace folder containing the object.
- query_text: str | None = None¶
Text of the query to be run.
- schema: str | None = None¶
Name of the schema where this query will be executed.
- tags: List[str] | None = None¶
- warehouse_id: str | None = None¶
ID of the SQL warehouse attached to the query.
- as_dict() dict ¶
Serializes the CreateQueryRequestQuery into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateQueryRequestQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateQueryRequestQuery ¶
Deserializes the CreateQueryRequestQuery from a dictionary.
- class databricks.sdk.service.sql.CreateQueryVisualizationsLegacyRequest¶
Add visualization to a query
- query_id: str¶
The identifier returned by :method:queries/create
- type: str¶
The type of visualization: chart, table, pivot table, and so on.
- options: Any¶
The options object varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying visualization settings in JSON.
- description: str | None = None¶
A short description of this visualization. This is not displayed in the UI.
- name: str | None = None¶
The name of the visualization that appears on dashboards and the query screen.
- as_dict() dict ¶
Serializes the CreateQueryVisualizationsLegacyRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateQueryVisualizationsLegacyRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateQueryVisualizationsLegacyRequest ¶
Deserializes the CreateQueryVisualizationsLegacyRequest from a dictionary.
- class databricks.sdk.service.sql.CreateVisualizationRequest¶
- visualization: CreateVisualizationRequestVisualization | None = None¶
- as_dict() dict ¶
Serializes the CreateVisualizationRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateVisualizationRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateVisualizationRequest ¶
Deserializes the CreateVisualizationRequest from a dictionary.
- class databricks.sdk.service.sql.CreateVisualizationRequestVisualization¶
- display_name: str | None = None¶
The display name of the visualization.
- query_id: str | None = None¶
UUID of the query that the visualization is attached to.
- serialized_options: str | None = None¶
The visualization options varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying visualization options directly.
- serialized_query_plan: str | None = None¶
The visualization query plan varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying the visualization query plan directly.
- type: str | None = None¶
The type of visualization: counter, table, funnel, and so on.
- as_dict() dict ¶
Serializes the CreateVisualizationRequestVisualization into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CreateVisualizationRequestVisualization into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateVisualizationRequestVisualization ¶
Deserializes the CreateVisualizationRequestVisualization 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 mins for serverless warehouses - Must be == 0 or >= 10 mins for non-serverless warehouses - 0 indicates no autostop.
Defaults to 120 mins
- 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.
- as_shallow_dict() dict ¶
Serializes the CreateWarehouseRequest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the CreateWarehouseResponse into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the CreateWidget into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateWidget ¶
Deserializes the CreateWidget from a dictionary.
- class databricks.sdk.service.sql.CronSchedule¶
- pause_status: SchedulePauseStatus | None = None¶
Indicate whether this schedule is paused or not.
- quartz_cron_schedule: str | None = None¶
A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html
- timezone_id: str | None = None¶
A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.
- as_dict() dict ¶
Serializes the CronSchedule into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the CronSchedule into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CronSchedule ¶
Deserializes the CronSchedule 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_id: int | None = None¶
The ID of the user who owns the dashboard.
- as_dict() dict ¶
Serializes the Dashboard into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the Dashboard into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the DashboardEditContent into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the DashboardOptions into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the DashboardPostContent into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the DataSource into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DataSource ¶
Deserializes the DataSource from a dictionary.
- class databricks.sdk.service.sql.DatePrecision¶
- DAY_PRECISION = "DAY_PRECISION"¶
- MINUTE_PRECISION = "MINUTE_PRECISION"¶
- SECOND_PRECISION = "SECOND_PRECISION"¶
- class databricks.sdk.service.sql.DateRange¶
- start: str¶
- end: str¶
- as_dict() dict ¶
Serializes the DateRange into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the DateRange into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.DateRangeValue¶
-
- dynamic_date_range_value: DateRangeValueDynamicDateRange | None = None¶
Dynamic date-time range value based on current date-time.
- precision: DatePrecision | None = None¶
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- start_day_of_week: int | None = None¶
- as_dict() dict ¶
Serializes the DateRangeValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the DateRangeValue into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DateRangeValue ¶
Deserializes the DateRangeValue from a dictionary.
- class databricks.sdk.service.sql.DateRangeValueDynamicDateRange¶
- LAST_12_MONTHS = "LAST_12_MONTHS"¶
- LAST_14_DAYS = "LAST_14_DAYS"¶
- LAST_24_HOURS = "LAST_24_HOURS"¶
- LAST_30_DAYS = "LAST_30_DAYS"¶
- LAST_60_DAYS = "LAST_60_DAYS"¶
- LAST_7_DAYS = "LAST_7_DAYS"¶
- LAST_8_HOURS = "LAST_8_HOURS"¶
- LAST_90_DAYS = "LAST_90_DAYS"¶
- LAST_HOUR = "LAST_HOUR"¶
- LAST_MONTH = "LAST_MONTH"¶
- LAST_WEEK = "LAST_WEEK"¶
- LAST_YEAR = "LAST_YEAR"¶
- THIS_MONTH = "THIS_MONTH"¶
- THIS_WEEK = "THIS_WEEK"¶
- THIS_YEAR = "THIS_YEAR"¶
- TODAY = "TODAY"¶
- YESTERDAY = "YESTERDAY"¶
- class databricks.sdk.service.sql.DateValue¶
- date_value: str | None = None¶
Manually specified date-time value.
- dynamic_date_value: DateValueDynamicDate | None = None¶
Dynamic date-time value based on current date-time.
- precision: DatePrecision | None = None¶
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- as_dict() dict ¶
Serializes the DateValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the DateValue into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.DeleteResponse¶
- as_dict() dict ¶
Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the DeleteResponse into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the DeleteWarehouseResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DeleteWarehouseResponse ¶
Deserializes the DeleteWarehouseResponse from a dictionary.
- 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.
- as_shallow_dict() dict ¶
Serializes the EditAlert into a shallow dictionary of its immediate attributes.
- 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
- 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.
- as_shallow_dict() dict ¶
Serializes the EditWarehouseRequest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the EditWarehouseResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) EditWarehouseResponse ¶
Deserializes the EditWarehouseResponse from a dictionary.
- class databricks.sdk.service.sql.Empty¶
Represents an empty message, similar to google.protobuf.Empty, which is not available in the firm right now.
- as_dict() dict ¶
Serializes the Empty into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the Empty into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the EndpointConfPair into a shallow dictionary of its immediate attributes.
- 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
- 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.
- as_shallow_dict() dict ¶
Serializes the EndpointHealth into a shallow dictionary of its immediate attributes.
- 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
- 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¶
Deprecated. 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.
- 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.
- as_shallow_dict() dict ¶
Serializes the EndpointInfo into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the EndpointTagPair into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the EndpointTags into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) EndpointTags ¶
Deserializes the EndpointTags from a dictionary.
- class databricks.sdk.service.sql.EnumValue¶
- enum_options: str | None = None¶
List of valid query parameter values, newline delimited.
- multi_values_options: MultiValuesOptions | None = None¶
If specified, allows multiple values to be selected for this parameter.
- values: List[str] | None = None¶
List of selected query parameter values.
- as_dict() dict ¶
Serializes the EnumValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the EnumValue into a shallow dictionary of its immediate attributes.
- 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?]
[What are SQL warehouses?]: https://docs.databricks.com/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¶
- 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.
- as_shallow_dict() dict ¶
Serializes the ExecuteStatementRequest into a shallow dictionary of its immediate attributes.
- 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.ExternalLink¶
- 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.
- external_link: str | None = None¶
- 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.
- next_chunk_internal_link: str | None = None¶
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.
- as_shallow_dict() dict ¶
Serializes the ExternalLink into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ExternalLink ¶
Deserializes the ExternalLink from a dictionary.
- class databricks.sdk.service.sql.ExternalQuerySource¶
- alert_id: str | None = None¶
The canonical identifier for this SQL alert
- dashboard_id: str | None = None¶
The canonical identifier for this Lakeview dashboard
- genie_space_id: str | None = None¶
The canonical identifier for this Genie space
- job_info: ExternalQuerySourceJobInfo | None = None¶
- legacy_dashboard_id: str | None = None¶
The canonical identifier for this legacy dashboard
- notebook_id: str | None = None¶
The canonical identifier for this notebook
- sql_query_id: str | None = None¶
The canonical identifier for this SQL query
- as_dict() dict ¶
Serializes the ExternalQuerySource into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ExternalQuerySource into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ExternalQuerySource ¶
Deserializes the ExternalQuerySource from a dictionary.
- class databricks.sdk.service.sql.ExternalQuerySourceJobInfo¶
- job_id: str | None = None¶
The canonical identifier for this job.
- job_run_id: str | None = None¶
The canonical identifier of the run. This ID is unique across all runs of all jobs.
- job_task_run_id: str | None = None¶
The canonical identifier of the task run.
- as_dict() dict ¶
Serializes the ExternalQuerySourceJobInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ExternalQuerySourceJobInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ExternalQuerySourceJobInfo ¶
Deserializes the ExternalQuerySourceJobInfo 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.
- as_shallow_dict() dict ¶
Serializes the GetResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetResponse ¶
Deserializes the GetResponse 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.
- as_shallow_dict() dict ¶
Serializes the GetWarehousePermissionLevelsResponse into a shallow dictionary of its immediate attributes.
- 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
- 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¶
Deprecated. 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.
- 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.
- as_shallow_dict() dict ¶
Serializes the GetWarehouseResponse into a shallow dictionary of its immediate attributes.
- 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¶
-
- 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.
- as_shallow_dict() dict ¶
Serializes the GetWorkspaceWarehouseConfigResponse into a shallow dictionary of its immediate attributes.
- 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.LegacyAlert¶
- 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: LegacyAlertState | 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.
- as_dict() dict ¶
Serializes the LegacyAlert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the LegacyAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LegacyAlert ¶
Deserializes the LegacyAlert from a dictionary.
- class databricks.sdk.service.sql.LegacyAlertState¶
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.LegacyQuery¶
- 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_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_id: int | None = None¶
The ID of the user who owns the query.
- visualizations: List[LegacyVisualization] | None = None¶
- as_dict() dict ¶
Serializes the LegacyQuery into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the LegacyQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LegacyQuery ¶
Deserializes the LegacyQuery from a dictionary.
- class databricks.sdk.service.sql.LegacyVisualization¶
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: LegacyQuery | 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 LegacyVisualization into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the LegacyVisualization into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) LegacyVisualization ¶
Deserializes the LegacyVisualization from a dictionary.
- class databricks.sdk.service.sql.ListAlertsResponse¶
- next_page_token: str | None = None¶
- results: List[ListAlertsResponseAlert] | None = None¶
- as_dict() dict ¶
Serializes the ListAlertsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListAlertsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListAlertsResponse ¶
Deserializes the ListAlertsResponse from a dictionary.
- class databricks.sdk.service.sql.ListAlertsResponseAlert¶
- condition: AlertCondition | None = None¶
Trigger conditions of the alert.
- create_time: str | None = None¶
The timestamp indicating when the alert was created.
- 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 can include email subject entries and Slack notification headers, for example. See [here] for custom templating instructions.
[here]: https://docs.databricks.com/sql/user/alerts/index.html
- display_name: str | None = None¶
The display name of the alert.
- id: str | None = None¶
UUID identifying the alert.
- lifecycle_state: LifecycleState | None = None¶
The workspace state of the alert. Used for tracking trashed status.
- notify_on_ok: bool | None = None¶
Whether to notify alert subscribers when alert returns back to normal.
- owner_user_name: str | None = None¶
The owner’s username. This field is set to “Unavailable” if the user has been deleted.
- query_id: str | None = None¶
UUID of the query attached to the alert.
- seconds_to_retrigger: int | None = None¶
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
- state: AlertState | None = None¶
Current state of the alert’s trigger status. This field is set to UNKNOWN if the alert has not yet been evaluated or ran into an error during the last evaluation.
- trigger_time: str | None = None¶
Timestamp when the alert was last triggered, if the alert has been triggered before.
- update_time: str | None = None¶
The timestamp indicating when the alert was updated.
- as_dict() dict ¶
Serializes the ListAlertsResponseAlert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListAlertsResponseAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListAlertsResponseAlert ¶
Deserializes the ListAlertsResponseAlert from a dictionary.
- class databricks.sdk.service.sql.ListAlertsV2Response¶
- next_page_token: str | None = None¶
- as_dict() dict ¶
Serializes the ListAlertsV2Response into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListAlertsV2Response into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListAlertsV2Response ¶
Deserializes the ListAlertsV2Response from a dictionary.
- 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.
- as_dict() dict ¶
Serializes the ListQueriesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListQueriesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListQueriesResponse ¶
Deserializes the ListQueriesResponse from a dictionary.
- class databricks.sdk.service.sql.ListQueryObjectsResponse¶
- next_page_token: str | None = None¶
- results: List[ListQueryObjectsResponseQuery] | None = None¶
- as_dict() dict ¶
Serializes the ListQueryObjectsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListQueryObjectsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListQueryObjectsResponse ¶
Deserializes the ListQueryObjectsResponse from a dictionary.
- class databricks.sdk.service.sql.ListQueryObjectsResponseQuery¶
- apply_auto_limit: bool | None = None¶
Whether to apply a 1000 row limit to the query result.
- catalog: str | None = None¶
Name of the catalog where this query will be executed.
- create_time: str | None = None¶
Timestamp when this query was created.
- description: str | None = None¶
General description that conveys additional information about this query such as usage notes.
- display_name: str | None = None¶
Display name of the query that appears in list views, widget headings, and on the query page.
- id: str | None = None¶
UUID identifying the query.
- last_modifier_user_name: str | None = None¶
Username of the user who last saved changes to this query.
- lifecycle_state: LifecycleState | None = None¶
Indicates whether the query is trashed.
- owner_user_name: str | None = None¶
Username of the user that owns the query.
- parameters: List[QueryParameter] | None = None¶
List of query parameter definitions.
- query_text: str | None = None¶
Text of the query to be run.
- schema: str | None = None¶
Name of the schema where this query will be executed.
- tags: List[str] | None = None¶
- update_time: str | None = None¶
Timestamp when this query was last updated.
- warehouse_id: str | None = None¶
ID of the SQL warehouse attached to the query.
- as_dict() dict ¶
Serializes the ListQueryObjectsResponseQuery into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListQueryObjectsResponseQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListQueryObjectsResponseQuery ¶
Deserializes the ListQueryObjectsResponseQuery 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.
- as_dict() dict ¶
Serializes the ListResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListResponse ¶
Deserializes the ListResponse from a dictionary.
- class databricks.sdk.service.sql.ListVisualizationsForQueryResponse¶
- next_page_token: str | None = None¶
- results: List[Visualization] | None = None¶
- as_dict() dict ¶
Serializes the ListVisualizationsForQueryResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the ListVisualizationsForQueryResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListVisualizationsForQueryResponse ¶
Deserializes the ListVisualizationsForQueryResponse 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.
- as_shallow_dict() dict ¶
Serializes the ListWarehousesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListWarehousesResponse ¶
Deserializes the ListWarehousesResponse from a dictionary.
- class databricks.sdk.service.sql.MultiValuesOptions¶
- 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.
- as_shallow_dict() dict ¶
Serializes the MultiValuesOptions into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) MultiValuesOptions ¶
Deserializes the MultiValuesOptions from a dictionary.
- class databricks.sdk.service.sql.NumericValue¶
- value: float | None = None¶
- as_dict() dict ¶
Serializes the NumericValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the NumericValue into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) NumericValue ¶
Deserializes the NumericValue 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.
- as_shallow_dict() dict ¶
Serializes the OdbcParams into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the Parameter into a shallow dictionary of its immediate attributes.
- 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¶
Possible Reasons for which we have not saved plans in the database
- 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¶
- apply_auto_limit: bool | None = None¶
Whether to apply a 1000 row limit to the query result.
- catalog: str | None = None¶
Name of the catalog where this query will be executed.
- create_time: str | None = None¶
Timestamp when this query was created.
- description: str | None = None¶
General description that conveys additional information about this query such as usage notes.
- display_name: str | None = None¶
Display name of the query that appears in list views, widget headings, and on the query page.
- id: str | None = None¶
UUID identifying the query.
- last_modifier_user_name: str | None = None¶
Username of the user who last saved changes to this query.
- lifecycle_state: LifecycleState | None = None¶
Indicates whether the query is trashed.
- owner_user_name: str | None = None¶
Username of the user that owns the query.
- parameters: List[QueryParameter] | None = None¶
List of query parameter definitions.
- parent_path: str | None = None¶
Workspace path of the workspace folder containing the object.
- query_text: str | None = None¶
Text of the query to be run.
- schema: str | None = None¶
Name of the schema where this query will be executed.
- tags: List[str] | None = None¶
- update_time: str | None = None¶
Timestamp when this query was last updated.
- warehouse_id: str | None = None¶
ID of the SQL warehouse attached to the query.
- as_dict() dict ¶
Serializes the Query into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the Query into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.QueryBackedValue¶
- multi_values_options: MultiValuesOptions | None = None¶
If specified, allows multiple values to be selected for this parameter.
- query_id: str | None = None¶
UUID of the query that provides the parameter values.
- values: List[str] | None = None¶
List of selected query parameter values.
- as_dict() dict ¶
Serializes the QueryBackedValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the QueryBackedValue into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryBackedValue ¶
Deserializes the QueryBackedValue 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.
- as_shallow_dict() dict ¶
Serializes the QueryEditContent into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryEditContent ¶
Deserializes the QueryEditContent from a dictionary.
- class databricks.sdk.service.sql.QueryFilter¶
- query_start_time_range: TimeRange | None = None¶
A range filter for query submitted time. The time range must be less than or equal to 30 days.
- statement_ids: List[str] | None = None¶
A list of statement IDs.
- statuses: List[QueryStatus] | None = None¶
A list of statuses (QUEUED, RUNNING, CANCELED, FAILED, FINISHED) to match query results. Corresponds to the status field in the response. Filtering for multiple statuses is not recommended. Instead, opt to filter by a single status multiple times and then combine the results.
- 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.
- as_shallow_dict() dict ¶
Serializes the QueryFilter into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryFilter ¶
Deserializes the QueryFilter from a dictionary.
- class databricks.sdk.service.sql.QueryInfo¶
- channel_used: ChannelInfo | None = None¶
SQL Warehouse channel information at the time of query execution
- client_application: str | None = None¶
Client application that ran the statement. For example: Databricks SQL Editor, Tableau, and Power BI. This field is derived from information provided by client applications. While values are expected to remain static over time, this cannot be guaranteed.
- duration: int | None = None¶
Total time of the statement execution. This value does not include the time taken to retrieve the results, which can result in a discrepancy between this value and the start-to-finish wall-clock time.
- 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_source: ExternalQuerySource | None = None¶
A struct that contains key-value pairs representing Databricks entities that were involved in the execution of this statement, such as jobs, notebooks, or dashboards. This field only records Databricks entities.
- 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 Spark UI 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.
- as_shallow_dict() dict ¶
Serializes the QueryInfo into a shallow dictionary of its immediate attributes.
- 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[LegacyQuery] | None = None¶
List of queries returned.
- as_dict() dict ¶
Serializes the QueryList into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the QueryList into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.QueryMetrics¶
A query metric that encapsulates a set of measurements for a single query. Metrics come from the driver and are stored in the history service database.
- 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.
- 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.
- 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.
- 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_time_over_time_range: TaskTimeOverRange | None = None¶
sum of task times completed in a range of wall clock time, approximated to a configurable number of points aggregated over all stages and jobs in the query (based on task_total_time_ms)
- 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.
- as_shallow_dict() dict ¶
Serializes the QueryMetrics into a shallow dictionary of its immediate attributes.
- 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.
- 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.
- as_shallow_dict() dict ¶
Serializes the QueryOptions into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryOptions ¶
Deserializes the QueryOptions from a dictionary.
- class databricks.sdk.service.sql.QueryParameter¶
- date_range_value: DateRangeValue | None = None¶
Date-range query parameter value. Can only specify one of dynamic_date_range_value or date_range_value.
- date_value: DateValue | None = None¶
Date query parameter value. Can only specify one of dynamic_date_value or date_value.
- name: str | None = None¶
Literal parameter marker that appears between double curly braces in the query text.
- numeric_value: NumericValue | None = None¶
Numeric query parameter value.
- query_backed_value: QueryBackedValue | None = None¶
Query-based dropdown query parameter value.
- title: str | None = None¶
Text displayed in the user-facing parameter widget in the UI.
- as_dict() dict ¶
Serializes the QueryParameter into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the QueryParameter into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryParameter ¶
Deserializes the QueryParameter 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.
- as_shallow_dict() dict ¶
Serializes the QueryPostContent into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueryPostContent ¶
Deserializes the QueryPostContent from a dictionary.
- class databricks.sdk.service.sql.QueryStatementType¶
- 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¶
Statuses which are also used by OperationStatus in runtime
- CANCELED = "CANCELED"¶
- COMPILED = "COMPILED"¶
- COMPILING = "COMPILING"¶
- FAILED = "FAILED"¶
- FINISHED = "FINISHED"¶
- QUEUED = "QUEUED"¶
- RUNNING = "RUNNING"¶
- STARTED = "STARTED"¶
- 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.
- as_shallow_dict() dict ¶
Serializes the RepeatedEndpointConfPairs into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the RestoreResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RestoreResponse ¶
Deserializes the RestoreResponse from a dictionary.
- class databricks.sdk.service.sql.ResultData¶
- 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.
- external_links: List[ExternalLink] | None = None¶
- 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.
- next_chunk_internal_link: str | None = None¶
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.
- as_shallow_dict() dict ¶
Serializes the ResultData into a shallow dictionary of its immediate attributes.
- 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.
- 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.
- as_shallow_dict() dict ¶
Serializes the ResultManifest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the ResultSchema into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the ServiceError into a shallow dictionary of its immediate attributes.
- 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.SetRequest¶
Set object ACL
- access_control_list: List[AccessControl] | None = None¶
- object_id: str | None = None¶
Object ID. The ACL for the object with this UUID is overwritten by this request’s POST content.
- object_type: ObjectTypePlural | None = None¶
The type of object permission to set.
- as_dict() dict ¶
Serializes the SetRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the SetRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SetRequest ¶
Deserializes the SetRequest from a dictionary.
- 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.
- as_shallow_dict() dict ¶
Serializes the SetResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SetResponse ¶
Deserializes the SetResponse from a dictionary.
- class databricks.sdk.service.sql.SetWorkspaceWarehouseConfigRequest¶
-
- 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.
- as_shallow_dict() dict ¶
Serializes the SetWorkspaceWarehouseConfigRequest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the SetWorkspaceWarehouseConfigResponse into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the StartWarehouseResponse into a shallow dictionary of its immediate attributes.
- 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] of the SQL language reference.
[Data types]: https://docs.databricks.com/sql/language-manual/functions/cast.html
- 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.
- as_shallow_dict() dict ¶
Serializes the StatementParameterListItem into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) StatementParameterListItem ¶
Deserializes the StatementParameterListItem from a dictionary.
- class databricks.sdk.service.sql.StatementResponse¶
- manifest: ResultManifest | None = None¶
The result manifest provides schema and metadata for the result set.
- result: ResultData | None = None¶
- 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 StatementResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the StatementResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) StatementResponse ¶
Deserializes the StatementResponse 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.
- as_shallow_dict() dict ¶
Serializes the StatementStatus into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the StopWarehouseResponse into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the Success into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.TaskTimeOverRange¶
- entries: List[TaskTimeOverRangeEntry] | None = None¶
- interval: int | None = None¶
interval length for all entries (difference in start time and end time of an entry range) the same for all entries start time of first interval is query_start_time_ms
- as_dict() dict ¶
Serializes the TaskTimeOverRange into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the TaskTimeOverRange into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TaskTimeOverRange ¶
Deserializes the TaskTimeOverRange from a dictionary.
- class databricks.sdk.service.sql.TaskTimeOverRangeEntry¶
- task_completed_time_ms: int | None = None¶
total task completion time in this time range, aggregated over all stages and jobs in the query
- as_dict() dict ¶
Serializes the TaskTimeOverRangeEntry into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the TaskTimeOverRangeEntry into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TaskTimeOverRangeEntry ¶
Deserializes the TaskTimeOverRangeEntry from a dictionary.
- 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.
- as_shallow_dict() dict ¶
Serializes the TerminationReason into a shallow dictionary of its immediate attributes.
- 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.TextValue¶
- value: str | None = None¶
- as_dict() dict ¶
Serializes the TextValue into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the TextValue into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.TimeRange¶
- end_time_ms: int | None = None¶
The end time in milliseconds.
- start_time_ms: int | None = None¶
The start time in milliseconds.
- as_dict() dict ¶
Serializes the TimeRange into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the TimeRange into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the TransferOwnershipObjectId into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TransferOwnershipObjectId ¶
Deserializes the TransferOwnershipObjectId from a dictionary.
- class databricks.sdk.service.sql.TransferOwnershipRequest¶
Transfer object ownership
- new_owner: str | None = None¶
Email address for the new owner, who must exist in the workspace.
- object_id: TransferOwnershipObjectId | None = None¶
The ID of the object on which to change ownership.
- object_type: OwnableObjectType | None = None¶
The type of object on which to change ownership.
- as_dict() dict ¶
Serializes the TransferOwnershipRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the TransferOwnershipRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TransferOwnershipRequest ¶
Deserializes the TransferOwnershipRequest from a dictionary.
- class databricks.sdk.service.sql.UpdateAlertRequest¶
- update_mask: str¶
The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.
A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future.
- alert: UpdateAlertRequestAlert | None = None¶
- auto_resolve_display_name: bool | None = None¶
If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert’s display name conflicts with an existing alert’s display name.
- id: str | None = None¶
- as_dict() dict ¶
Serializes the UpdateAlertRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateAlertRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateAlertRequest ¶
Deserializes the UpdateAlertRequest from a dictionary.
- class databricks.sdk.service.sql.UpdateAlertRequestAlert¶
- condition: AlertCondition | None = None¶
Trigger conditions of the alert.
- 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 can include email subject entries and Slack notification headers, for example. See [here] for custom templating instructions.
[here]: https://docs.databricks.com/sql/user/alerts/index.html
- display_name: str | None = None¶
The display name of the alert.
- notify_on_ok: bool | None = None¶
Whether to notify alert subscribers when alert returns back to normal.
- owner_user_name: str | None = None¶
The owner’s username. This field is set to “Unavailable” if the user has been deleted.
- query_id: str | None = None¶
UUID of the query attached to the alert.
- seconds_to_retrigger: int | None = None¶
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
- as_dict() dict ¶
Serializes the UpdateAlertRequestAlert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateAlertRequestAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateAlertRequestAlert ¶
Deserializes the UpdateAlertRequestAlert from a dictionary.
- class databricks.sdk.service.sql.UpdateQueryRequest¶
- update_mask: str¶
The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.
A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future.
- auto_resolve_display_name: bool | None = None¶
If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert’s display name conflicts with an existing alert’s display name.
- id: str | None = None¶
- query: UpdateQueryRequestQuery | None = None¶
- as_dict() dict ¶
Serializes the UpdateQueryRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateQueryRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateQueryRequest ¶
Deserializes the UpdateQueryRequest from a dictionary.
- class databricks.sdk.service.sql.UpdateQueryRequestQuery¶
- apply_auto_limit: bool | None = None¶
Whether to apply a 1000 row limit to the query result.
- catalog: str | None = None¶
Name of the catalog where this query will be executed.
- description: str | None = None¶
General description that conveys additional information about this query such as usage notes.
- display_name: str | None = None¶
Display name of the query that appears in list views, widget headings, and on the query page.
- owner_user_name: str | None = None¶
Username of the user that owns the query.
- parameters: List[QueryParameter] | None = None¶
List of query parameter definitions.
- query_text: str | None = None¶
Text of the query to be run.
- schema: str | None = None¶
Name of the schema where this query will be executed.
- tags: List[str] | None = None¶
- warehouse_id: str | None = None¶
ID of the SQL warehouse attached to the query.
- as_dict() dict ¶
Serializes the UpdateQueryRequestQuery into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateQueryRequestQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateQueryRequestQuery ¶
Deserializes the UpdateQueryRequestQuery 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.
- as_shallow_dict() dict ¶
Serializes the UpdateResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateResponse ¶
Deserializes the UpdateResponse from a dictionary.
- class databricks.sdk.service.sql.UpdateVisualizationRequest¶
- update_mask: str¶
The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.
A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future.
- id: str | None = None¶
- visualization: UpdateVisualizationRequestVisualization | None = None¶
- as_dict() dict ¶
Serializes the UpdateVisualizationRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateVisualizationRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateVisualizationRequest ¶
Deserializes the UpdateVisualizationRequest from a dictionary.
- class databricks.sdk.service.sql.UpdateVisualizationRequestVisualization¶
- display_name: str | None = None¶
The display name of the visualization.
- serialized_options: str | None = None¶
The visualization options varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying visualization options directly.
- serialized_query_plan: str | None = None¶
The visualization query plan varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying the visualization query plan directly.
- type: str | None = None¶
The type of visualization: counter, table, funnel, and so on.
- as_dict() dict ¶
Serializes the UpdateVisualizationRequestVisualization into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the UpdateVisualizationRequestVisualization into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) UpdateVisualizationRequestVisualization ¶
Deserializes the UpdateVisualizationRequestVisualization 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.
- as_shallow_dict() dict ¶
Serializes the User into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.sql.Visualization¶
- create_time: str | None = None¶
The timestamp indicating when the visualization was created.
- display_name: str | None = None¶
The display name of the visualization.
- id: str | None = None¶
UUID identifying the visualization.
- query_id: str | None = None¶
UUID of the query that the visualization is attached to.
- serialized_options: str | None = None¶
The visualization options varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying visualization options directly.
- serialized_query_plan: str | None = None¶
The visualization query plan varies widely from one visualization type to the next and is unsupported. Databricks does not recommend modifying the visualization query plan directly.
- type: str | None = None¶
The type of visualization: counter, table, funnel, and so on.
- update_time: str | None = None¶
The timestamp indicating when the visualization was updated.
- as_dict() dict ¶
Serializes the Visualization into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict ¶
Serializes the Visualization into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehouseAccessControlRequest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehouseAccessControlResponse into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehousePermission into a shallow dictionary of its immediate attributes.
- 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_MONITOR = "CAN_MONITOR"¶
- CAN_USE = "CAN_USE"¶
- CAN_VIEW = "CAN_VIEW"¶
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehousePermissions into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehousePermissionsDescription into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehousePermissionsRequest into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WarehouseTypePair into a shallow dictionary of its immediate attributes.
- 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: LegacyVisualization | 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.
- as_shallow_dict() dict ¶
Serializes the Widget into a shallow dictionary of its immediate attributes.
- 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
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.
- as_shallow_dict() dict ¶
Serializes the WidgetOptions into a shallow dictionary of its immediate attributes.
- 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.
- as_shallow_dict() dict ¶
Serializes the WidgetPosition into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WidgetPosition ¶
Deserializes the WidgetPosition from a dictionary.