Jobs¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.jobs module.
- class databricks.sdk.service.jobs.AlertEvaluationState¶
Same alert evaluation state as in redash-v2/api/proto/alertsv2/alerts.proto
- ERROR = "ERROR"¶
- OK = "OK"¶
- TRIGGERED = "TRIGGERED"¶
- UNKNOWN = "UNKNOWN"¶
- class databricks.sdk.service.jobs.AlertTask(alert_id: 'Optional[str]' = None, subscribers: 'Optional[List[AlertTaskSubscriber]]' = None, warehouse_id: 'Optional[str]' = None, workspace_path: 'Optional[str]' = None)¶
- alert_id: str | None = None¶
The alert_id is the canonical identifier of the alert.
- subscribers: List[AlertTaskSubscriber] | None = None¶
The subscribers receive alert evaluation result notifications after the alert task is completed. The number of subscriptions is limited to 100.
- warehouse_id: str | None = None¶
The warehouse_id identifies the warehouse settings used by the alert task.
- workspace_path: str | None = None¶
The workspace_path is the path to the alert file in the workspace. The path: * must start with “/Workspace” * must be a normalized path. User has to select only one of alert_id or workspace_path to identify the alert.
- as_dict() dict¶
Serializes the AlertTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the AlertTask into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.AlertTaskOutput(alert_state: 'Optional[AlertEvaluationState]' = None)¶
- alert_state: AlertEvaluationState | None = None¶
- as_dict() dict¶
Serializes the AlertTaskOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the AlertTaskOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertTaskOutput¶
Deserializes the AlertTaskOutput from a dictionary.
- class databricks.sdk.service.jobs.AlertTaskSubscriber(destination_id: str | None = None, user_name: str | None = None)¶
Represents a subscriber that will receive alert notifications. A subscriber can be either a user (via email) or a notification destination (via destination_id).
- destination_id: str | None = None¶
- user_name: str | None = None¶
A valid workspace email address.
- as_dict() dict¶
Serializes the AlertTaskSubscriber into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the AlertTaskSubscriber into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) AlertTaskSubscriber¶
Deserializes the AlertTaskSubscriber from a dictionary.
- class databricks.sdk.service.jobs.BaseJob(created_time: 'Optional[int]' = None, creator_user_name: 'Optional[str]' = None, effective_budget_policy_id: 'Optional[str]' = None, effective_usage_policy_id: 'Optional[str]' = None, has_more: 'Optional[bool]' = None, job_id: 'Optional[int]' = None, settings: 'Optional[JobSettings]' = None, trigger_state: 'Optional[TriggerStateProto]' = None)¶
- created_time: int | None = None¶
The time at which this job was created in epoch milliseconds (milliseconds since 1/1/1970 UTC).
- creator_user_name: str | None = None¶
The creator user name. This field won’t be included in the response if the user has already been deleted.
- effective_budget_policy_id: str | None = None¶
The id of the budget policy used by this job for cost attribution purposes. This may be set through (in order of precedence): 1. Budget admins through the account or workspace console 2. Jobs UI in the job details page and Jobs API using budget_policy_id 3. Inferred default based on accessible budget policies of the run_as identity on job creation or modification.
- effective_usage_policy_id: str | None = None¶
The id of the usage policy used by this job for cost attribution purposes.
- has_more: bool | None = None¶
Indicates if the job has more array properties (tasks, job_clusters) that are not shown. They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2 :method:jobs/list requests with expand_tasks=true.
- job_id: int | None = None¶
The canonical identifier for this job.
- settings: JobSettings | None = None¶
Settings for this job and all of its runs. These settings can be updated using the resetJob method.
- trigger_state: TriggerStateProto | None = None¶
State of the trigger associated with the job.
- as_dict() dict¶
Serializes the BaseJob into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BaseJob into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.BaseRun(attempt_number: 'Optional[int]' = None, cleanup_duration: 'Optional[int]' = None, cluster_instance: 'Optional[ClusterInstance]' = None, cluster_spec: 'Optional[ClusterSpec]' = None, creator_user_name: 'Optional[str]' = None, description: 'Optional[str]' = None, effective_performance_target: 'Optional[PerformanceTarget]' = None, effective_usage_policy_id: 'Optional[str]' = None, end_time: 'Optional[int]' = None, execution_duration: 'Optional[int]' = None, git_source: 'Optional[GitSource]' = None, has_more: 'Optional[bool]' = None, job_clusters: 'Optional[List[JobCluster]]' = None, job_id: 'Optional[int]' = None, job_parameters: 'Optional[List[JobParameter]]' = None, job_run_id: 'Optional[int]' = None, number_in_job: 'Optional[int]' = None, original_attempt_run_id: 'Optional[int]' = None, overriding_parameters: 'Optional[RunParameters]' = None, queue_duration: 'Optional[int]' = None, repair_history: 'Optional[List[RepairHistoryItem]]' = None, run_duration: 'Optional[int]' = None, run_id: 'Optional[int]' = None, run_name: 'Optional[str]' = None, run_page_url: 'Optional[str]' = None, run_type: 'Optional[RunType]' = None, schedule: 'Optional[CronSchedule]' = None, setup_duration: 'Optional[int]' = None, start_time: 'Optional[int]' = None, state: 'Optional[RunState]' = None, status: 'Optional[RunStatus]' = None, tasks: 'Optional[List[RunTask]]' = None, trigger: 'Optional[TriggerType]' = None, trigger_info: 'Optional[TriggerInfo]' = None)¶
- attempt_number: int | None = None¶
The sequence number of this run attempt for a triggered job run. The initial attempt of a run has an attempt_number of 0. If the initial run attempt fails, and the job has a retry policy (max_retries > 0), subsequent runs are created with an original_attempt_run_id of the original attempt’s ID and an incrementing attempt_number. Runs are retried only until they succeed, and the maximum attempt_number is the same as the max_retries value for the job.
- cleanup_duration: int | None = None¶
The time in milliseconds it took to terminate the cluster and clean up any associated artifacts. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The cleanup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- cluster_instance: ClusterInstance | None = None¶
The cluster used for this run. If the run is specified to use a new cluster, this field is set once the Jobs service has requested a cluster for the run.
- cluster_spec: ClusterSpec | None = None¶
A snapshot of the job’s cluster specification when this run was created.
- creator_user_name: str | None = None¶
The creator user name. This field won’t be included in the response if the user has already been deleted.
- description: str | None = None¶
Description of the run
- effective_performance_target: PerformanceTarget | None = None¶
The actual performance target used by the serverless run during execution. This can differ from the client-set performance target on the request depending on whether the performance mode is supported by the job type.
STANDARD: Enables cost-efficient execution of serverless workloads. *
PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
- effective_usage_policy_id: str | None = None¶
The id of the usage policy used by this run for cost attribution purposes.
- end_time: int | None = None¶
The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This field is set to 0 if the job is still running.
- execution_duration: int | None = None¶
The time in milliseconds it took to execute the commands in the JAR or notebook until they completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The execution_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- git_source: GitSource | None = None¶
An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks.
If git_source is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting source to WORKSPACE on the task.
Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, git_source must be defined on the job.
- has_more: bool | None = None¶
Indicates if the run has more array properties (tasks, job_clusters) that are not shown. They can be accessed via :method:jobs/getrun endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests with expand_tasks=true.
- job_clusters: List[JobCluster] | None = None¶
A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings. If more than 100 job clusters are available, you can paginate through them using :method:jobs/getrun.
- job_id: int | None = None¶
The canonical identifier of the job that contains this run.
- job_parameters: List[JobParameter] | None = None¶
Job-level parameters used in the run
- job_run_id: int | None = None¶
ID of the job run that this run belongs to. For legacy and single-task job runs the field is populated with the job run ID. For task runs, the field is populated with the ID of the job run that the task run belongs to.
- number_in_job: int | None = None¶
A unique identifier for this job run. This is set to the same value as run_id.
- original_attempt_run_id: int | None = None¶
If this run is a retry of a prior run attempt, this field contains the run_id of the original attempt; otherwise, it is the same as the run_id.
- overriding_parameters: RunParameters | None = None¶
The parameters used for this run.
- queue_duration: int | None = None¶
The time in milliseconds that the run has spent in the queue.
- repair_history: List[RepairHistoryItem] | None = None¶
The repair history of the run.
- run_duration: int | None = None¶
The time in milliseconds it took the job run and all of its repairs to finish.
- run_id: int | None = None¶
The canonical identifier of the run. This ID is unique across all runs of all jobs.
- run_name: str | None = None¶
An optional name for the run. The maximum length is 4096 bytes in UTF-8 encoding.
- run_page_url: str | None = None¶
The URL to the detail page of the run.
- schedule: CronSchedule | None = None¶
The cron schedule that triggered this run if it was triggered by the periodic scheduler.
- setup_duration: int | None = None¶
The time in milliseconds it took to set up the cluster. For runs that run on new clusters this is the cluster creation time, for runs that run on existing clusters this time should be very short. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The setup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- start_time: int | None = None¶
The time at which this run was started in epoch milliseconds (milliseconds since 1/1/1970 UTC). This may not be the time when the job task starts executing, for example, if the job is scheduled to run on a new cluster, this is the time the cluster creation call is issued.
- tasks: List[RunTask] | None = None¶
The list of tasks performed by the run. Each task has its own run_id which you can use to call JobsGetOutput to retrieve the run results. If more than 100 tasks are available, you can paginate through them using :method:jobs/getrun. Use the next_page_token field at the object root to determine if more results are available.
- trigger: TriggerType | None = None¶
- trigger_info: TriggerInfo | None = None¶
- as_dict() dict¶
Serializes the BaseRun into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the BaseRun into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.CleanRoomTaskRunLifeCycleState¶
Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to remove coupling with jobs API definition
- BLOCKED = "BLOCKED"¶
- INTERNAL_ERROR = "INTERNAL_ERROR"¶
- PENDING = "PENDING"¶
- QUEUED = "QUEUED"¶
- RUNNING = "RUNNING"¶
- RUN_LIFE_CYCLE_STATE_UNSPECIFIED = "RUN_LIFE_CYCLE_STATE_UNSPECIFIED"¶
- SKIPPED = "SKIPPED"¶
- TERMINATED = "TERMINATED"¶
- TERMINATING = "TERMINATING"¶
- WAITING_FOR_RETRY = "WAITING_FOR_RETRY"¶
- class databricks.sdk.service.jobs.CleanRoomTaskRunResultState¶
Copied from elastic-spark-common/api/messages/runs.proto. Using the original definition to avoid cyclic dependency.
- CANCELED = "CANCELED"¶
- DISABLED = "DISABLED"¶
- EVICTED = "EVICTED"¶
- EXCLUDED = "EXCLUDED"¶
- FAILED = "FAILED"¶
- MAXIMUM_CONCURRENT_RUNS_REACHED = "MAXIMUM_CONCURRENT_RUNS_REACHED"¶
- RUN_RESULT_STATE_UNSPECIFIED = "RUN_RESULT_STATE_UNSPECIFIED"¶
- SUCCESS = "SUCCESS"¶
- SUCCESS_WITH_FAILURES = "SUCCESS_WITH_FAILURES"¶
- TIMEDOUT = "TIMEDOUT"¶
- UPSTREAM_CANCELED = "UPSTREAM_CANCELED"¶
- UPSTREAM_EVICTED = "UPSTREAM_EVICTED"¶
- UPSTREAM_FAILED = "UPSTREAM_FAILED"¶
- class databricks.sdk.service.jobs.CleanRoomTaskRunState(life_cycle_state: CleanRoomTaskRunLifeCycleState | None = None, result_state: CleanRoomTaskRunResultState | None = None)¶
Stores the run state of the clean rooms notebook task.
- life_cycle_state: CleanRoomTaskRunLifeCycleState | None = None¶
A value indicating the run’s current lifecycle state. This field is always available in the response. Note: Additional states might be introduced in future releases.
- result_state: CleanRoomTaskRunResultState | None = None¶
A value indicating the run’s result. This field is only available for terminal lifecycle states. Note: Additional states might be introduced in future releases.
- as_dict() dict¶
Serializes the CleanRoomTaskRunState into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CleanRoomTaskRunState into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CleanRoomTaskRunState¶
Deserializes the CleanRoomTaskRunState from a dictionary.
- class databricks.sdk.service.jobs.CleanRoomsNotebookTask(clean_room_name: str, notebook_name: str, etag: str | None = None, notebook_base_parameters: Dict[str, str] | None = None)¶
Clean Rooms notebook task for V1 Clean Room service (GA). Replaces the deprecated CleanRoomNotebookTask (defined above) which was for V0 service.
- clean_room_name: str¶
The clean room that the notebook belongs to.
- notebook_name: str¶
Name of the notebook being run.
- etag: str | None = None¶
Checksum to validate the freshness of the notebook resource (i.e. the notebook being run is the latest version). It can be fetched by calling the :method:cleanroomassets/get API.
- notebook_base_parameters: Dict[str, str] | None = None¶
Base parameters to be used for the clean room notebook job.
- as_dict() dict¶
Serializes the CleanRoomsNotebookTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CleanRoomsNotebookTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CleanRoomsNotebookTask¶
Deserializes the CleanRoomsNotebookTask from a dictionary.
- class databricks.sdk.service.jobs.CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput(clean_room_job_run_state: 'Optional[CleanRoomTaskRunState]' = None, notebook_output: 'Optional[NotebookOutput]' = None, output_schema_info: 'Optional[OutputSchemaInfo]' = None)¶
- clean_room_job_run_state: CleanRoomTaskRunState | None = None¶
The run state of the clean rooms notebook task.
- notebook_output: NotebookOutput | None = None¶
The notebook output for the clean room run
- output_schema_info: OutputSchemaInfo | None = None¶
Information on how to access the output schema for the clean room run
- as_dict() dict¶
Serializes the CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput¶
Deserializes the CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput from a dictionary.
- class databricks.sdk.service.jobs.ClusterInstance(cluster_id: 'Optional[str]' = None, spark_context_id: 'Optional[str]' = None)¶
- cluster_id: str | None = None¶
The canonical identifier for the cluster used by a run. This field is always available for runs on existing clusters. For runs on new clusters, it becomes available once the cluster is created. This value can be used to view logs by browsing to /#setting/sparkui/$cluster_id/driver-logs. The logs continue to be available after the run completes.
The response won’t include this field if the identifier is not available yet.
- spark_context_id: str | None = None¶
The canonical identifier for the Spark context used by a run. This field is filled in once the run begins execution. This value can be used to view the Spark UI by browsing to /#setting/sparkui/$cluster_id/$spark_context_id. The Spark UI continues to be available after the run has completed.
The response won’t include this field if the identifier is not available yet.
- as_dict() dict¶
Serializes the ClusterInstance into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ClusterInstance into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ClusterInstance¶
Deserializes the ClusterInstance from a dictionary.
- class databricks.sdk.service.jobs.ClusterSpec(existing_cluster_id: 'Optional[str]' = None, job_cluster_key: 'Optional[str]' = None, libraries: 'Optional[List[compute.Library]]' = None, new_cluster: 'Optional[compute.ClusterSpec]' = None)¶
- existing_cluster_id: str | None = None¶
If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops responding. We suggest running jobs and tasks on new clusters for greater reliability
- job_cluster_key: str | None = None¶
If job_cluster_key, this task is executed reusing the cluster specified in job.settings.job_clusters.
- libraries: List[Library] | None = None¶
An optional list of libraries to be installed on the cluster. The default value is an empty list.
- new_cluster: ClusterSpec | None = None¶
If new_cluster, a description of a new cluster that is created for each run.
- as_dict() dict¶
Serializes the ClusterSpec into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ClusterSpec into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ClusterSpec¶
Deserializes the ClusterSpec from a dictionary.
- class databricks.sdk.service.jobs.Compute(hardware_accelerator: 'Optional[compute.HardwareAcceleratorType]' = None)¶
- hardware_accelerator: HardwareAcceleratorType | None = None¶
Hardware accelerator configuration for Serverless GPU workloads.
- as_dict() dict¶
Serializes the Compute into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Compute into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.ComputeConfig(num_gpus: 'int', gpu_node_pool_id: 'Optional[str]' = None, gpu_type: 'Optional[str]' = None)¶
- num_gpus: int¶
Number of GPUs.
- gpu_node_pool_id: str | None = None¶
IDof the GPU pool to use.
- gpu_type: str | None = None¶
GPU type.
- as_dict() dict¶
Serializes the ComputeConfig into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ComputeConfig into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ComputeConfig¶
Deserializes the ComputeConfig from a dictionary.
- class databricks.sdk.service.jobs.Condition¶
- ALL_UPDATED = "ALL_UPDATED"¶
- ANY_UPDATED = "ANY_UPDATED"¶
- class databricks.sdk.service.jobs.ConditionTask(op: 'ConditionTaskOp', left: 'str', right: 'str')¶
- op: ConditionTaskOp¶
EQUAL_TO, NOT_EQUAL operators perform string comparison of their operands. This means that
“12.0” == “12” will evaluate to false. * GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL operators perform numeric comparison of their operands. “12.0” >= “12” will evaluate to true, “10.0” >= “12” will evaluate to false.
The boolean comparison to task values can be implemented with operators EQUAL_TO, NOT_EQUAL. If a task value was set to a boolean value, it will be serialized to “true” or “false” for the comparison.
- left: str¶
The left operand of the condition task. Can be either a string value or a job state or parameter reference.
- right: str¶
The right operand of the condition task. Can be either a string value or a job state or parameter reference.
- as_dict() dict¶
Serializes the ConditionTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ConditionTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ConditionTask¶
Deserializes the ConditionTask from a dictionary.
- class databricks.sdk.service.jobs.ConditionTaskOp¶
EQUAL_TO, NOT_EQUAL operators perform string comparison of their operands. This means that “12.0” == “12” will evaluate to false. * GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL operators perform numeric comparison of their operands. “12.0” >= “12” will evaluate to true, “10.0” >= “12” will evaluate to false.
The boolean comparison to task values can be implemented with operators EQUAL_TO, NOT_EQUAL. If a task value was set to a boolean value, it will be serialized to “true” or “false” for the comparison.
- EQUAL_TO = "EQUAL_TO"¶
- GREATER_THAN = "GREATER_THAN"¶
- GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL"¶
- LESS_THAN = "LESS_THAN"¶
- LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL"¶
- NOT_EQUAL = "NOT_EQUAL"¶
- class databricks.sdk.service.jobs.Continuous(pause_status: 'Optional[PauseStatus]' = None, task_retry_mode: 'Optional[TaskRetryMode]' = None)¶
- pause_status: PauseStatus | None = None¶
Indicate whether the continuous execution of the job is paused or not. Defaults to UNPAUSED.
- task_retry_mode: TaskRetryMode | None = None¶
Indicate whether the continuous job is applying task level retries or not. Defaults to NEVER.
- as_dict() dict¶
Serializes the Continuous into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Continuous into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) Continuous¶
Deserializes the Continuous from a dictionary.
- class databricks.sdk.service.jobs.CreateResponse(job_id: int | None = None)¶
Job was created successfully
- job_id: int | None = None¶
The canonical identifier for the newly created job.
- as_dict() dict¶
Serializes the CreateResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the CreateResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) CreateResponse¶
Deserializes the CreateResponse from a dictionary.
- class databricks.sdk.service.jobs.CronSchedule(quartz_cron_expression: 'str', timezone_id: 'str', pause_status: 'Optional[PauseStatus]' = None)¶
- quartz_cron_expression: str¶
A Cron expression using Quartz syntax that describes the schedule for a job. See [Cron Trigger] for details. This field is required.
[Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
- timezone_id: str¶
A Java timezone ID. The schedule for a job is resolved with respect to this timezone. See [Java TimeZone] for details. This field is required.
[Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html
- pause_status: PauseStatus | None = None¶
Indicate whether this schedule is paused or not.
- 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.jobs.DashboardPageSnapshot(page_display_name: 'Optional[str]' = None, widget_error_details: 'Optional[List[WidgetErrorDetail]]' = None)¶
- page_display_name: str | None = None¶
- widget_error_details: List[WidgetErrorDetail] | None = None¶
- as_dict() dict¶
Serializes the DashboardPageSnapshot into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DashboardPageSnapshot into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DashboardPageSnapshot¶
Deserializes the DashboardPageSnapshot from a dictionary.
- class databricks.sdk.service.jobs.DashboardTask(dashboard_id: str | None = None, filters: Dict[str, str] | None = None, subscription: Subscription | None = None, warehouse_id: str | None = None)¶
Configures the Lakeview Dashboard job task type.
- dashboard_id: str | None = None¶
The identifier of the dashboard to refresh.
- filters: Dict[str, str] | None = None¶
Dashboard task parameters. Used to apply dashboard filter values during dashboard task execution. Parameter values get applied to any dashboard filters that have a matching URL identifier as the parameter key. The parameter value format is dependent on the filter type: - For text and single-select filters, provide a single value (e.g. “value”) - For date and datetime filters, provide the value in ISO 8601 format (e.g. “2000-01-01T00:00:00”) - For multi-select filters, provide a JSON array of values (e.g. “[“value1”,”value2”]”) - For range and date range filters, provide a JSON object with start and end (e.g. “{“start”:”1”,”end”:”10”}”)
- subscription: Subscription | None = None¶
Optional: subscription configuration for sending the dashboard snapshot.
- warehouse_id: str | None = None¶
Optional: The warehouse id to execute the dashboard with for the schedule. If not specified, the default warehouse of the dashboard will be used.
- as_dict() dict¶
Serializes the DashboardTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DashboardTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DashboardTask¶
Deserializes the DashboardTask from a dictionary.
- class databricks.sdk.service.jobs.DashboardTaskOutput(page_snapshots: 'Optional[List[DashboardPageSnapshot]]' = None)¶
- page_snapshots: List[DashboardPageSnapshot] | None = None¶
Should only be populated for manual PDF download jobs.
- as_dict() dict¶
Serializes the DashboardTaskOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DashboardTaskOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DashboardTaskOutput¶
Deserializes the DashboardTaskOutput from a dictionary.
- class databricks.sdk.service.jobs.DbtCloudJobRunStep(index: int | None = None, logs: str | None = None, name: str | None = None, status: DbtPlatformRunStatus | None = None)¶
Format of response retrieved from dbt Cloud, for inclusion in output Deprecated in favor of DbtPlatformJobRunStep
- index: int | None = None¶
Orders the steps in the job
- logs: str | None = None¶
Output of the step
- name: str | None = None¶
Name of the step in the job
- status: DbtPlatformRunStatus | None = None¶
State of the step
- as_dict() dict¶
Serializes the DbtCloudJobRunStep into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtCloudJobRunStep into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtCloudJobRunStep¶
Deserializes the DbtCloudJobRunStep from a dictionary.
- class databricks.sdk.service.jobs.DbtCloudTask(connection_resource_name: str | None = None, dbt_cloud_job_id: int | None = None)¶
Deprecated in favor of DbtPlatformTask
- connection_resource_name: str | None = None¶
The resource name of the UC connection that authenticates the dbt Cloud for this task
- dbt_cloud_job_id: int | None = None¶
Id of the dbt Cloud job to be triggered
- as_dict() dict¶
Serializes the DbtCloudTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtCloudTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtCloudTask¶
Deserializes the DbtCloudTask from a dictionary.
- class databricks.sdk.service.jobs.DbtCloudTaskOutput(dbt_cloud_job_run_id: int | None = None, dbt_cloud_job_run_output: List[DbtCloudJobRunStep] | None = None, dbt_cloud_job_run_url: str | None = None)¶
Deprecated in favor of DbtPlatformTaskOutput
- dbt_cloud_job_run_id: int | None = None¶
Id of the job run in dbt Cloud
- dbt_cloud_job_run_output: List[DbtCloudJobRunStep] | None = None¶
Steps of the job run as received from dbt Cloud
- dbt_cloud_job_run_url: str | None = None¶
Url where full run details can be viewed
- as_dict() dict¶
Serializes the DbtCloudTaskOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtCloudTaskOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtCloudTaskOutput¶
Deserializes the DbtCloudTaskOutput from a dictionary.
- class databricks.sdk.service.jobs.DbtOutput(artifacts_headers: 'Optional[Dict[str, str]]' = None, artifacts_link: 'Optional[str]' = None)¶
- artifacts_headers: Dict[str, str] | None = None¶
An optional map of headers to send when retrieving the artifact from the artifacts_link.
- artifacts_link: str | None = None¶
A pre-signed URL to download the (compressed) dbt artifacts. This link is valid for a limited time (30 minutes). This information is only available after the run has finished.
- as_dict() dict¶
Serializes the DbtOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtOutput into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.DbtPlatformJobRunStep(index: int | None = None, logs: str | None = None, logs_truncated: bool | None = None, name: str | None = None, name_truncated: bool | None = None, status: DbtPlatformRunStatus | None = None)¶
Format of response retrieved from dbt platform, for inclusion in output
- index: int | None = None¶
Orders the steps in the job
- logs: str | None = None¶
Output of the step
- logs_truncated: bool | None = None¶
Whether the logs of this step have been truncated. If true, the logs has been truncated to 10000 characters.
- name: str | None = None¶
Name of the step in the job
- name_truncated: bool | None = None¶
Whether the name of the job has been truncated. If true, the name has been truncated to 100 characters.
- status: DbtPlatformRunStatus | None = None¶
State of the step
- as_dict() dict¶
Serializes the DbtPlatformJobRunStep into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtPlatformJobRunStep into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtPlatformJobRunStep¶
Deserializes the DbtPlatformJobRunStep from a dictionary.
- class databricks.sdk.service.jobs.DbtPlatformRunStatus¶
Response enumeration from calling the dbt platform API, for inclusion in output
- CANCELLED = "CANCELLED"¶
- ERROR = "ERROR"¶
- QUEUED = "QUEUED"¶
- RUNNING = "RUNNING"¶
- STARTING = "STARTING"¶
- SUCCESS = "SUCCESS"¶
- class databricks.sdk.service.jobs.DbtPlatformTask(connection_resource_name: 'Optional[str]' = None, dbt_platform_job_id: 'Optional[str]' = None)¶
- connection_resource_name: str | None = None¶
The resource name of the UC connection that authenticates the dbt platform for this task
- dbt_platform_job_id: str | None = None¶
Id of the dbt platform job to be triggered. Specified as a string for maximum compatibility with clients.
- as_dict() dict¶
Serializes the DbtPlatformTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtPlatformTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtPlatformTask¶
Deserializes the DbtPlatformTask from a dictionary.
- class databricks.sdk.service.jobs.DbtPlatformTaskOutput(dbt_platform_job_run_id: 'Optional[str]' = None, dbt_platform_job_run_output: 'Optional[List[DbtPlatformJobRunStep]]' = None, dbt_platform_job_run_url: 'Optional[str]' = None, steps_truncated: 'Optional[bool]' = None)¶
- dbt_platform_job_run_id: str | None = None¶
Id of the job run in dbt platform. Specified as a string for maximum compatibility with clients.
- dbt_platform_job_run_output: List[DbtPlatformJobRunStep] | None = None¶
Steps of the job run as received from dbt platform
- dbt_platform_job_run_url: str | None = None¶
Url where full run details can be viewed
- steps_truncated: bool | None = None¶
Whether the number of steps in the output has been truncated. If true, the output will contain the first 20 steps of the output.
- as_dict() dict¶
Serializes the DbtPlatformTaskOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtPlatformTaskOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DbtPlatformTaskOutput¶
Deserializes the DbtPlatformTaskOutput from a dictionary.
- class databricks.sdk.service.jobs.DbtTask(commands: 'List[str]', catalog: 'Optional[str]' = None, profiles_directory: 'Optional[str]' = None, project_directory: 'Optional[str]' = None, schema: 'Optional[str]' = None, source: 'Optional[Source]' = None, warehouse_id: 'Optional[str]' = None)¶
- commands: List[str]¶
A list of dbt commands to execute. All commands must start with dbt. This parameter must not be empty. A maximum of up to 10 commands can be provided.
- catalog: str | None = None¶
Optional name of the catalog to use. The value is the top level in the 3-level namespace of Unity Catalog (catalog / schema / relation). The catalog value can only be specified if a warehouse_id is specified. Requires dbt-databricks >= 1.1.1.
- profiles_directory: str | None = None¶
Optional (relative) path to the profiles directory. Can only be specified if no warehouse_id is specified. If no warehouse_id is specified and this folder is unset, the root directory is used.
- project_directory: str | None = None¶
Path to the project directory. Optional for Git sourced tasks, in which case if no value is provided, the root of the Git repository is used.
- schema: str | None = None¶
Optional schema to write to. This parameter is only used when a warehouse_id is also provided. If not provided, the default schema is used.
- source: Source | None = None¶
Optional location type of the project directory. When set to WORKSPACE, the project will be retrieved from the local Databricks workspace. When set to GIT, the project will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise.
WORKSPACE: Project is located in Databricks workspace. * GIT: Project is located in cloud
Git provider.
- warehouse_id: str | None = None¶
ID of the SQL warehouse to connect to. If provided, we automatically generate and provide the profile and connection details to dbt. It can be overridden on a per-command basis by using the –profiles-dir command line argument.
- as_dict() dict¶
Serializes the DbtTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DbtTask into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.EnforcePolicyComplianceForJobResponseJobClusterSettingsChange(field: str | None = None, new_value: str | None = None, previous_value: str | None = None)¶
Represents a change to the job cluster’s settings that would be required for the job clusters to become compliant with their policies.
- field: str | None = None¶
The field where this change would be made, prepended with the job cluster key.
- new_value: str | None = None¶
The new value of this field after enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The typed new value of this field can be retrieved by reading the settings field in the API response.
- previous_value: str | None = None¶
The previous value of this field before enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The type of the field can be retrieved by reading the settings field in the API response.
- as_dict() dict¶
Serializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) EnforcePolicyComplianceForJobResponseJobClusterSettingsChange¶
Deserializes the EnforcePolicyComplianceForJobResponseJobClusterSettingsChange from a dictionary.
- class databricks.sdk.service.jobs.EnforcePolicyComplianceResponse(has_changes: 'Optional[bool]' = None, job_cluster_changes: 'Optional[List[EnforcePolicyComplianceForJobResponseJobClusterSettingsChange]]' = None, settings: 'Optional[JobSettings]' = None)¶
- has_changes: bool | None = None¶
Whether any changes have been made to the job cluster settings for the job to become compliant with its policies.
- job_cluster_changes: List[EnforcePolicyComplianceForJobResponseJobClusterSettingsChange] | None = None¶
A list of job cluster changes that have been made to the job’s cluster settings in order for all job clusters to become compliant with their policies.
- settings: JobSettings | None = None¶
Updated job settings after policy enforcement. Policy enforcement only applies to job clusters that are created when running the job (which are specified in new_cluster) and does not apply to existing all-purpose clusters. Updated job settings are derived by applying policy default values to the existing job clusters in order to satisfy policy requirements.
- as_dict() dict¶
Serializes the EnforcePolicyComplianceResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the EnforcePolicyComplianceResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) EnforcePolicyComplianceResponse¶
Deserializes the EnforcePolicyComplianceResponse from a dictionary.
- class databricks.sdk.service.jobs.ExportRunOutput(views: List[ViewItem] | None = None)¶
Run was exported successfully.
- views: List[ViewItem] | None = None¶
The exported content in HTML format (one for every view item). To extract the HTML notebook from the JSON response, download and run this [Python script](/_static/examples/extract.py).
- as_dict() dict¶
Serializes the ExportRunOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ExportRunOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ExportRunOutput¶
Deserializes the ExportRunOutput from a dictionary.
- class databricks.sdk.service.jobs.FileArrivalTriggerConfiguration(url: 'str', min_time_between_triggers_seconds: 'Optional[int]' = None, wait_after_last_change_seconds: 'Optional[int]' = None)¶
- url: str¶
URL to be monitored for file arrivals. The path must point to the root or a subpath of the external location.
- min_time_between_triggers_seconds: int | None = None¶
If set, the trigger starts a run only after the specified amount of time passed since the last time the trigger fired. The minimum allowed value is 60 seconds
- wait_after_last_change_seconds: int | None = None¶
If set, the trigger starts a run only after no file activity has occurred for the specified amount of time. This makes it possible to wait for a batch of incoming files to arrive before triggering a run. The minimum allowed value is 60 seconds.
- as_dict() dict¶
Serializes the FileArrivalTriggerConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the FileArrivalTriggerConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) FileArrivalTriggerConfiguration¶
Deserializes the FileArrivalTriggerConfiguration from a dictionary.
- class databricks.sdk.service.jobs.FileArrivalTriggerState(using_file_events: 'Optional[bool]' = None)¶
- using_file_events: bool | None = None¶
Indicates whether the trigger leverages file events to detect file arrivals.
- as_dict() dict¶
Serializes the FileArrivalTriggerState into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the FileArrivalTriggerState into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) FileArrivalTriggerState¶
Deserializes the FileArrivalTriggerState from a dictionary.
- class databricks.sdk.service.jobs.ForEachStats(error_message_stats: 'Optional[List[ForEachTaskErrorMessageStats]]' = None, task_run_stats: 'Optional[ForEachTaskTaskRunStats]' = None)¶
- error_message_stats: List[ForEachTaskErrorMessageStats] | None = None¶
Sample of 3 most common error messages occurred during the iteration.
- task_run_stats: ForEachTaskTaskRunStats | None = None¶
Describes stats of the iteration. Only latest retries are considered.
- as_dict() dict¶
Serializes the ForEachStats into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ForEachStats into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ForEachStats¶
Deserializes the ForEachStats from a dictionary.
- class databricks.sdk.service.jobs.ForEachTask(inputs: 'str', task: 'Task', concurrency: 'Optional[int]' = None)¶
- inputs: str¶
Array for task to iterate on. This can be a JSON string or a reference to an array parameter.
- concurrency: int | None = None¶
An optional maximum allowed number of concurrent runs of the task. Set this value if you want to be able to execute multiple runs of the task concurrently.
- as_dict() dict¶
Serializes the ForEachTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ForEachTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ForEachTask¶
Deserializes the ForEachTask from a dictionary.
- class databricks.sdk.service.jobs.ForEachTaskErrorMessageStats(count: 'Optional[int]' = None, error_message: 'Optional[str]' = None, termination_category: 'Optional[str]' = None)¶
- count: int | None = None¶
Describes the count of such error message encountered during the iterations.
- error_message: str | None = None¶
Describes the error message occurred during the iterations.
- termination_category: str | None = None¶
Describes the termination reason for the error message.
- as_dict() dict¶
Serializes the ForEachTaskErrorMessageStats into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ForEachTaskErrorMessageStats into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ForEachTaskErrorMessageStats¶
Deserializes the ForEachTaskErrorMessageStats from a dictionary.
- class databricks.sdk.service.jobs.ForEachTaskTaskRunStats(active_iterations: 'Optional[int]' = None, completed_iterations: 'Optional[int]' = None, failed_iterations: 'Optional[int]' = None, scheduled_iterations: 'Optional[int]' = None, succeeded_iterations: 'Optional[int]' = None, total_iterations: 'Optional[int]' = None)¶
- active_iterations: int | None = None¶
Describes the iteration runs having an active lifecycle state or an active run sub state.
- completed_iterations: int | None = None¶
Describes the number of failed and succeeded iteration runs.
- failed_iterations: int | None = None¶
Describes the number of failed iteration runs.
- scheduled_iterations: int | None = None¶
Describes the number of iteration runs that have been scheduled.
- succeeded_iterations: int | None = None¶
Describes the number of succeeded iteration runs.
- total_iterations: int | None = None¶
Describes the length of the list of items to iterate over.
- as_dict() dict¶
Serializes the ForEachTaskTaskRunStats into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ForEachTaskTaskRunStats into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ForEachTaskTaskRunStats¶
Deserializes the ForEachTaskTaskRunStats from a dictionary.
- class databricks.sdk.service.jobs.GenAiComputeTask(dl_runtime_image: str, command: str | None = None, compute: ComputeConfig | None = None, mlflow_experiment_name: str | None = None, source: Source | None = None, training_script_path: str | None = None, yaml_parameters: str | None = None, yaml_parameters_file_path: str | None = None)¶
DEPRECATED — use AiRuntimeTask for all new BYOT multi-node GPU workloads (see ai_runtime_task.proto). AiRuntimeTask is the only supported BYOT task type for new workloads; this proto is retained only for AIR CLI (fka SGCLI) pywheel backwards compatibility and will be removed once the pywheel → databricks-cli migration completes (post- PuPr).
- dl_runtime_image: str¶
Runtime image
- command: str | None = None¶
Command launcher to run the actual script, e.g. bash, python etc.
- compute: ComputeConfig | None = None¶
- mlflow_experiment_name: str | None = None¶
Optional string containing the name of the MLflow experiment to log the run to. If name is not found, backend will create the mlflow experiment using the name.
- source: Source | None = None¶
Optional location type of the training script. When set to WORKSPACE, the script will be retrieved from the local Databricks workspace. When set to GIT, the script will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise. * WORKSPACE: Script is located in Databricks workspace. * GIT: Script is located in cloud Git provider.
- training_script_path: str | None = None¶
The training script file path to be executed. Cloud file URIs (such as dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For python files stored in the Databricks workspace, the path must be absolute and begin with /. For files stored in a remote repository, the path must be relative. This field is required.
- yaml_parameters: str | None = None¶
Optional string containing model parameters passed to the training script in yaml format. If present, then the content in yaml_parameters_file_path will be ignored.
- yaml_parameters_file_path: str | None = None¶
Optional path to a YAML file containing model parameters passed to the training script.
- as_dict() dict¶
Serializes the GenAiComputeTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GenAiComputeTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GenAiComputeTask¶
Deserializes the GenAiComputeTask from a dictionary.
- class databricks.sdk.service.jobs.GetJobPermissionLevelsResponse(permission_levels: 'Optional[List[JobPermissionsDescription]]' = None)¶
- permission_levels: List[JobPermissionsDescription] | None = None¶
Specific permission levels
- as_dict() dict¶
Serializes the GetJobPermissionLevelsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GetJobPermissionLevelsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetJobPermissionLevelsResponse¶
Deserializes the GetJobPermissionLevelsResponse from a dictionary.
- class databricks.sdk.service.jobs.GetPolicyComplianceResponse(is_compliant: 'Optional[bool]' = None, violations: 'Optional[Dict[str, str]]' = None)¶
- is_compliant: bool | None = None¶
Whether the job is compliant with its policies or not. Jobs could be out of compliance if a policy they are using was updated after the job was last edited and some of its job clusters no longer comply with their updated policies.
- violations: Dict[str, str] | None = None¶
An object containing key-value mappings representing the first 200 policy validation errors. The keys indicate the path where the policy validation error is occurring. An identifier for the job cluster is prepended to the path. The values indicate an error message describing the policy validation error.
- as_dict() dict¶
Serializes the GetPolicyComplianceResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GetPolicyComplianceResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GetPolicyComplianceResponse¶
Deserializes the GetPolicyComplianceResponse from a dictionary.
- class databricks.sdk.service.jobs.GitProvider¶
- AWS_CODE_COMMIT = "AWS_CODE_COMMIT"¶
- AZURE_DEV_OPS_SERVICES = "AZURE_DEV_OPS_SERVICES"¶
- BITBUCKET_CLOUD = "BITBUCKET_CLOUD"¶
- BITBUCKET_SERVER = "BITBUCKET_SERVER"¶
- GIT_HUB = "GIT_HUB"¶
- GIT_HUB_ENTERPRISE = "GIT_HUB_ENTERPRISE"¶
- GIT_LAB = "GIT_LAB"¶
- GIT_LAB_ENTERPRISE_EDITION = "GIT_LAB_ENTERPRISE_EDITION"¶
- class databricks.sdk.service.jobs.GitSnapshot(used_commit: str | None = None)¶
Read-only state of the remote repository at the time the job was run. This field is only included on job runs.
- used_commit: str | None = None¶
Commit that was used to execute the run. If git_branch was specified, this points to the HEAD of the branch at the time of the run; if git_tag was specified, this points to the commit the tag points to.
- as_dict() dict¶
Serializes the GitSnapshot into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GitSnapshot into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) GitSnapshot¶
Deserializes the GitSnapshot from a dictionary.
- class databricks.sdk.service.jobs.GitSource(git_url: str, git_provider: GitProvider, git_branch: str | None = None, git_commit: str | None = None, git_snapshot: GitSnapshot | None = None, git_tag: str | None = None, job_source: JobSource | None = None, sparse_checkout: SparseCheckout | None = None)¶
An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks.
If git_source is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting source to WORKSPACE on the task.
Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, git_source must be defined on the job.
- git_url: str¶
URL of the repository to be cloned by this job.
- git_provider: GitProvider¶
Unique identifier of the service used to host the Git repository. The value is case insensitive.
- git_branch: str | None = None¶
Name of the branch to be checked out and used by this job. This field cannot be specified in conjunction with git_tag or git_commit.
- git_commit: str | None = None¶
Commit to be checked out and used by this job. This field cannot be specified in conjunction with git_branch or git_tag.
- git_snapshot: GitSnapshot | None = None¶
- git_tag: str | None = None¶
Name of the tag to be checked out and used by this job. This field cannot be specified in conjunction with git_branch or git_commit.
- job_source: JobSource | None = None¶
The source of the job specification in the remote repository when the job is source controlled.
- sparse_checkout: SparseCheckout | None = None¶
- as_dict() dict¶
Serializes the GitSource into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GitSource into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.Job(created_time: int | None = None, creator_user_name: str | None = None, effective_budget_policy_id: str | None = None, effective_usage_policy_id: str | None = None, has_more: bool | None = None, job_id: int | None = None, next_page_token: str | None = None, run_as_user_name: str | None = None, settings: JobSettings | None = None, trigger_state: TriggerStateProto | None = None)¶
Job was retrieved successfully.
- created_time: int | None = None¶
The time at which this job was created in epoch milliseconds (milliseconds since 1/1/1970 UTC).
- creator_user_name: str | None = None¶
The creator user name. This field won’t be included in the response if the user has already been deleted.
- effective_budget_policy_id: str | None = None¶
The id of the budget policy used by this job for cost attribution purposes. This may be set through (in order of precedence): 1. Budget admins through the account or workspace console 2. Jobs UI in the job details page and Jobs API using budget_policy_id 3. Inferred default based on accessible budget policies of the run_as identity on job creation or modification.
- effective_usage_policy_id: str | None = None¶
The id of the usage policy used by this job for cost attribution purposes.
- has_more: bool | None = None¶
Indicates if the job has more array properties (tasks, job_clusters) that are not shown. They can be accessed via :method:jobs/get endpoint. It is only relevant for API 2.2 :method:jobs/list requests with expand_tasks=true.
- job_id: int | None = None¶
The canonical identifier for this job.
- next_page_token: str | None = None¶
A token that can be used to list the next page of array properties.
- run_as_user_name: str | None = None¶
The email of an active workspace user or the application ID of a service principal that the job runs as. This value can be changed by setting the run_as field when creating or updating a job.
By default, run_as_user_name is based on the current job settings and is set to the creator of the job if job access control is disabled or to the user with the is_owner permission if job access control is enabled.
- settings: JobSettings | None = None¶
Settings for this job and all of its runs. These settings can be updated using the resetJob method.
- trigger_state: TriggerStateProto | None = None¶
State of the trigger associated with the job.
- as_dict() dict¶
Serializes the Job into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Job into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.JobAccessControlRequest(group_name: 'Optional[str]' = None, permission_level: 'Optional[JobPermissionLevel]' = None, service_principal_name: 'Optional[str]' = None, user_name: 'Optional[str]' = None)¶
- group_name: str | None = None¶
name of the group
- permission_level: JobPermissionLevel | None = None¶
- 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 JobAccessControlRequest into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobAccessControlRequest into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobAccessControlRequest¶
Deserializes the JobAccessControlRequest from a dictionary.
- class databricks.sdk.service.jobs.JobAccessControlResponse(all_permissions: 'Optional[List[JobPermission]]' = None, display_name: 'Optional[str]' = None, group_name: 'Optional[str]' = None, service_principal_name: 'Optional[str]' = None, user_name: 'Optional[str]' = None)¶
- all_permissions: List[JobPermission] | 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 JobAccessControlResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobAccessControlResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobAccessControlResponse¶
Deserializes the JobAccessControlResponse from a dictionary.
- class databricks.sdk.service.jobs.JobCluster(job_cluster_key: 'str', new_cluster: 'compute.ClusterSpec')¶
- job_cluster_key: str¶
A unique name for the job cluster. This field is required and must be unique within the job. JobTaskSettings may refer to this field to determine which cluster to launch for the task execution.
- new_cluster: ClusterSpec¶
If new_cluster, a description of a cluster that is created for each task.
- as_dict() dict¶
Serializes the JobCluster into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobCluster into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobCluster¶
Deserializes the JobCluster from a dictionary.
- class databricks.sdk.service.jobs.JobCompliance(job_id: 'int', is_compliant: 'Optional[bool]' = None, violations: 'Optional[Dict[str, str]]' = None)¶
- job_id: int¶
Canonical unique identifier for a job.
- is_compliant: bool | None = None¶
Whether this job is in compliance with the latest version of its policy.
- violations: Dict[str, str] | None = None¶
An object containing key-value mappings representing the first 200 policy validation errors. The keys indicate the path where the policy validation error is occurring. An identifier for the job cluster is prepended to the path. The values indicate an error message describing the policy validation error.
- as_dict() dict¶
Serializes the JobCompliance into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobCompliance into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobCompliance¶
Deserializes the JobCompliance from a dictionary.
- class databricks.sdk.service.jobs.JobDeployment(kind: 'JobDeploymentKind', deployment_id: 'Optional[str]' = None, metadata_file_path: 'Optional[str]' = None, version_id: 'Optional[str]' = None)¶
- kind: JobDeploymentKind¶
The kind of deployment that manages the job.
BUNDLE: The job is managed by Databricks Asset Bundle. * SYSTEM_MANAGED: The job is
managed by Databricks and is read-only.
- deployment_id: str | None = None¶
ID of the deployment that manages this job. Only set when kind is BUNDLE. Used to look up deployment metadata from the Deployment Metadata service.
- metadata_file_path: str | None = None¶
Path of the file that contains deployment metadata.
- version_id: str | None = None¶
ID of the version of the deployment that produced this job. Only set when kind is BUNDLE. Identifies a specific snapshot of the deployment in the Deployment Metadata service.
- as_dict() dict¶
Serializes the JobDeployment into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobDeployment into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobDeployment¶
Deserializes the JobDeployment from a dictionary.
- class databricks.sdk.service.jobs.JobDeploymentKind¶
BUNDLE: The job is managed by Databricks Asset Bundle. * SYSTEM_MANAGED: The job is managed by Databricks and is read-only.
- BUNDLE = "BUNDLE"¶
- SYSTEM_MANAGED = "SYSTEM_MANAGED"¶
- class databricks.sdk.service.jobs.JobEditMode¶
Edit mode of the job. * UI_LOCKED: The job is in a locked UI state and cannot be modified. * EDITABLE: The job is in an editable state and can be modified.
- EDITABLE = "EDITABLE"¶
- UI_LOCKED = "UI_LOCKED"¶
- class databricks.sdk.service.jobs.JobEmailNotifications(no_alert_for_skipped_runs: 'Optional[bool]' = None, on_duration_warning_threshold_exceeded: 'Optional[List[str]]' = None, on_failure: 'Optional[List[str]]' = None, on_start: 'Optional[List[str]]' = None, on_streaming_backlog_exceeded: 'Optional[List[str]]' = None, on_success: 'Optional[List[str]]' = None)¶
- no_alert_for_skipped_runs: bool | None = None¶
If true, do not send email to recipients specified in on_failure if the run is skipped. This field is deprecated. Please use the notification_settings.no_alert_for_skipped_runs field.
- on_duration_warning_threshold_exceeded: List[str] | None = None¶
A list of email addresses to be notified when the duration of a run exceeds the threshold specified for the RUN_DURATION_SECONDS metric in the health field. If no rule for the RUN_DURATION_SECONDS metric is specified in the health field for the job, notifications are not sent.
- on_failure: List[str] | None = None¶
A list of email addresses to be notified when a run unsuccessfully completes. A run is considered to have completed unsuccessfully if it ends with an INTERNAL_ERROR life_cycle_state or a FAILED, or TIMED_OUT result_state. If this is not specified on job creation, reset, or update the list is empty, and notifications are not sent.
- on_start: List[str] | None = None¶
A list of email addresses to be notified when a run begins. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent.
- on_streaming_backlog_exceeded: List[str] | None = None¶
A list of email addresses to notify when any streaming backlog thresholds are exceeded for any stream. Streaming backlog thresholds can be set in the health field using the following metrics: STREAMING_BACKLOG_BYTES, STREAMING_BACKLOG_RECORDS, STREAMING_BACKLOG_SECONDS, or STREAMING_BACKLOG_FILES. Alerting is based on the 10-minute average of these metrics. If the issue persists, notifications are resent every 30 minutes.
- on_success: List[str] | None = None¶
A list of email addresses to be notified when a run successfully completes. A run is considered to have completed successfully if it ends with a TERMINATED life_cycle_state and a SUCCESS result_state. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent.
- as_dict() dict¶
Serializes the JobEmailNotifications into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobEmailNotifications into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobEmailNotifications¶
Deserializes the JobEmailNotifications from a dictionary.
- class databricks.sdk.service.jobs.JobEnvironment(environment_key: 'str', spec: 'Optional[compute.Environment]' = None)¶
- environment_key: str¶
The key of an environment. It has to be unique within a job.
- spec: Environment | None = None¶
- as_dict() dict¶
Serializes the JobEnvironment into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobEnvironment into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobEnvironment¶
Deserializes the JobEnvironment from a dictionary.
- class databricks.sdk.service.jobs.JobNotificationSettings(no_alert_for_canceled_runs: 'Optional[bool]' = None, no_alert_for_skipped_runs: 'Optional[bool]' = None)¶
- no_alert_for_canceled_runs: bool | None = None¶
If true, do not send notifications to recipients specified in on_failure if the run is canceled.
- no_alert_for_skipped_runs: bool | None = None¶
If true, do not send notifications to recipients specified in on_failure if the run is skipped.
- as_dict() dict¶
Serializes the JobNotificationSettings into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobNotificationSettings into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobNotificationSettings¶
Deserializes the JobNotificationSettings from a dictionary.
- class databricks.sdk.service.jobs.JobParameter(default: 'Optional[str]' = None, name: 'Optional[str]' = None, value: 'Optional[str]' = None)¶
- default: str | None = None¶
The optional default value of the parameter
- name: str | None = None¶
The name of the parameter
- value: str | None = None¶
The value used in the run
- as_dict() dict¶
Serializes the JobParameter into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobParameter into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobParameter¶
Deserializes the JobParameter from a dictionary.
- class databricks.sdk.service.jobs.JobParameterDefinition(name: 'str', default: 'str')¶
- name: str¶
The name of the defined parameter. May only contain alphanumeric characters, _, -, and .
- default: str¶
Default value of the parameter.
- as_dict() dict¶
Serializes the JobParameterDefinition into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobParameterDefinition into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobParameterDefinition¶
Deserializes the JobParameterDefinition from a dictionary.
- class databricks.sdk.service.jobs.JobPermission(inherited: 'Optional[bool]' = None, inherited_from_object: 'Optional[List[str]]' = None, permission_level: 'Optional[JobPermissionLevel]' = None)¶
- inherited: bool | None = None¶
- inherited_from_object: List[str] | None = None¶
- permission_level: JobPermissionLevel | None = None¶
- as_dict() dict¶
Serializes the JobPermission into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobPermission into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobPermission¶
Deserializes the JobPermission from a dictionary.
- class databricks.sdk.service.jobs.JobPermissionLevel¶
Permission level
- CAN_MANAGE = "CAN_MANAGE"¶
- CAN_MANAGE_RUN = "CAN_MANAGE_RUN"¶
- CAN_VIEW = "CAN_VIEW"¶
- IS_OWNER = "IS_OWNER"¶
- class databricks.sdk.service.jobs.JobPermissions(access_control_list: 'Optional[List[JobAccessControlResponse]]' = None, object_id: 'Optional[str]' = None, object_type: 'Optional[str]' = None)¶
- access_control_list: List[JobAccessControlResponse] | None = None¶
- object_id: str | None = None¶
- object_type: str | None = None¶
- as_dict() dict¶
Serializes the JobPermissions into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobPermissions into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobPermissions¶
Deserializes the JobPermissions from a dictionary.
- class databricks.sdk.service.jobs.JobPermissionsDescription(description: 'Optional[str]' = None, permission_level: 'Optional[JobPermissionLevel]' = None)¶
- description: str | None = None¶
- permission_level: JobPermissionLevel | None = None¶
- as_dict() dict¶
Serializes the JobPermissionsDescription into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobPermissionsDescription into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobPermissionsDescription¶
Deserializes the JobPermissionsDescription from a dictionary.
- class databricks.sdk.service.jobs.JobRunAs(group_name: str | None = None, service_principal_name: str | None = None, user_name: str | None = None)¶
Write-only setting. Specifies the user or service principal that the job runs as. If not specified, the job runs as the user who created the job.
Either user_name or service_principal_name should be specified. If not, an error is thrown.
- group_name: str | None = None¶
Group name of an account group assigned to the workspace. Setting this field requires being a member of the group.
- service_principal_name: str | None = None¶
Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.
- user_name: str | None = None¶
The email of an active workspace user. Non-admin users can only set this field to their own email.
- as_dict() dict¶
Serializes the JobRunAs into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobRunAs into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.JobSettings(budget_policy_id: 'Optional[str]' = None, continuous: 'Optional[Continuous]' = None, deployment: 'Optional[JobDeployment]' = None, description: 'Optional[str]' = None, edit_mode: 'Optional[JobEditMode]' = None, email_notifications: 'Optional[JobEmailNotifications]' = None, environments: 'Optional[List[JobEnvironment]]' = None, format: 'Optional[Format]' = None, git_source: 'Optional[GitSource]' = None, health: 'Optional[JobsHealthRules]' = None, job_clusters: 'Optional[List[JobCluster]]' = None, max_concurrent_runs: 'Optional[int]' = None, name: 'Optional[str]' = None, notification_settings: 'Optional[JobNotificationSettings]' = None, parameters: 'Optional[List[JobParameterDefinition]]' = None, performance_target: 'Optional[PerformanceTarget]' = None, queue: 'Optional[QueueSettings]' = None, run_as: 'Optional[JobRunAs]' = None, schedule: 'Optional[CronSchedule]' = None, tags: 'Optional[Dict[str, str]]' = None, tasks: 'Optional[List[Task]]' = None, timeout_seconds: 'Optional[int]' = None, trigger: 'Optional[TriggerSettings]' = None, usage_policy_id: 'Optional[str]' = None, webhook_notifications: 'Optional[WebhookNotifications]' = None)¶
- budget_policy_id: str | None = None¶
The id of the user specified budget policy to use for this job. If not specified, a default budget policy may be applied when creating or modifying the job. See effective_budget_policy_id for the budget policy used by this workload.
- continuous: Continuous | None = None¶
An optional continuous property for this job. The continuous property will ensure that there is always one run executing. Only one of schedule and continuous can be used.
- deployment: JobDeployment | None = None¶
Deployment information for jobs managed by external sources.
- description: str | None = None¶
An optional description for the job. The maximum length is 27700 characters in UTF-8 encoding.
- edit_mode: JobEditMode | None = None¶
Edit mode of the job.
UI_LOCKED: The job is in a locked UI state and cannot be modified. * EDITABLE: The job is
in an editable state and can be modified.
- email_notifications: JobEmailNotifications | None = None¶
An optional set of email addresses that is notified when runs of this job begin or complete as well as when this job is deleted.
- environments: List[JobEnvironment] | None = None¶
A list of task execution environment specifications that can be referenced by serverless tasks of this job. For serverless notebook tasks, if the environment_key is not specified, the notebook environment will be used if present. If a jobs environment is specified, it will override the notebook environment. For other serverless tasks, the task environment is required to be specified using environment_key in the task settings.
- format: Format | None = None¶
Used to tell what is the format of the job. This field is ignored in Create/Update/Reset calls. When using the Jobs API 2.1 this value is always set to “MULTI_TASK”.
- git_source: GitSource | None = None¶
An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks.
If git_source is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting source to WORKSPACE on the task.
Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, git_source must be defined on the job.
- health: JobsHealthRules | None = None¶
- job_clusters: List[JobCluster] | None = None¶
A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings.
- max_concurrent_runs: int | None = None¶
An optional maximum allowed number of concurrent runs of the job. Set this value if you want to be able to execute multiple runs of the same job concurrently. This is useful for example if you trigger your job on a frequent schedule and want to allow consecutive runs to overlap with each other, or if you want to trigger multiple runs which differ by their input parameters. This setting affects only new runs. For example, suppose the job’s concurrency is 4 and there are 4 concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active runs. However, from then on, new runs are skipped unless there are fewer than 3 active runs. This value cannot exceed 1000. Setting this value to 0 causes all new runs to be skipped.
- name: str | None = None¶
An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding.
- notification_settings: JobNotificationSettings | None = None¶
Optional notification settings that are used when sending notifications to each of the email_notifications and webhook_notifications for this job.
- parameters: List[JobParameterDefinition] | None = None¶
Job-level parameter definitions
- performance_target: PerformanceTarget | None = None¶
The performance mode on a serverless job. This field determines the level of compute performance or cost-efficiency for the run. The performance target does not apply to tasks that run on Serverless GPU compute.
STANDARD: Enables cost-efficient execution of serverless workloads. *
PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
- queue: QueueSettings | None = None¶
The queue settings of the job.
- run_as: JobRunAs | None = None¶
The user or service principal that the job runs as, if specified in the request. This field indicates the explicit configuration of run_as for the job. To find the value in all cases, explicit or implicit, use run_as_user_name.
- schedule: CronSchedule | None = None¶
An optional periodic schedule for this job. The default behavior is that the job only runs when triggered by clicking “Run Now” in the Jobs UI or sending an API request to runNow.
- tags: Dict[str, str] | None = None¶
A map of tags associated with the job. These are forwarded to the cluster as cluster tags for jobs clusters, and are subject to the same limitations as cluster tags. A maximum of 25 tags can be added to the job.
- tasks: List[Task] | None = None¶
A list of task specifications to be executed by this job. It supports up to 1000 elements in write endpoints (:method:jobs/create, :method:jobs/reset, :method:jobs/update, :method:jobs/submit). Read endpoints return only 100 tasks. If more than 100 tasks are available, you can paginate through them using :method:jobs/get. Use the next_page_token field at the object root to determine if more results are available.
- timeout_seconds: int | None = None¶
An optional timeout applied to each run of this job. A value of 0 means no timeout.
- trigger: TriggerSettings | None = None¶
A configuration to trigger a run when certain conditions are met. The default behavior is that the job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API request to runNow.
- usage_policy_id: str | None = None¶
The id of the user specified usage policy to use for this job. If not specified, a default usage policy may be applied when creating or modifying the job. See effective_usage_policy_id for the usage policy used by this workload.
- webhook_notifications: WebhookNotifications | None = None¶
A collection of system notification IDs to notify when runs of this job begin or complete.
- as_dict() dict¶
Serializes the JobSettings into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobSettings into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobSettings¶
Deserializes the JobSettings from a dictionary.
- class databricks.sdk.service.jobs.JobSource(job_config_path: str, import_from_git_branch: str, dirty_state: JobSourceDirtyState | None = None)¶
The source of the job specification in the remote repository when the job is source controlled.
- job_config_path: str¶
Path of the job YAML file that contains the job specification.
- import_from_git_branch: str¶
Name of the branch which the job is imported from.
- dirty_state: JobSourceDirtyState | None = None¶
Dirty state indicates the job is not fully synced with the job specification in the remote repository.
Possible values are: * NOT_SYNCED: The job is not yet synced with the remote job specification. Import the remote job specification from UI to make the job fully synced. * DISCONNECTED: The job is temporary disconnected from the remote job specification and is allowed for live edit. Import the remote job specification again from UI to make the job fully synced.
- as_dict() dict¶
Serializes the JobSource into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobSource into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.JobSourceDirtyState¶
Dirty state indicates the job is not fully synced with the job specification in the remote repository. Possible values are: * NOT_SYNCED: The job is not yet synced with the remote job specification. Import the remote job specification from UI to make the job fully synced. * DISCONNECTED: The job is temporary disconnected from the remote job specification and is allowed for live edit. Import the remote job specification again from UI to make the job fully synced.
- DISCONNECTED = "DISCONNECTED"¶
- NOT_SYNCED = "NOT_SYNCED"¶
- class databricks.sdk.service.jobs.JobsHealthMetric¶
Specifies the health metric that is being evaluated for a particular health rule. * RUN_DURATION_SECONDS: Expected total time for a run in seconds. * STREAMING_BACKLOG_BYTES: An estimate of the maximum bytes of data waiting to be consumed across all streams. This metric is in Public Preview. * STREAMING_BACKLOG_RECORDS: An estimate of the maximum offset lag across all streams. This metric is in Public Preview. * STREAMING_BACKLOG_SECONDS: An estimate of the maximum consumer delay across all streams. This metric is in Public Preview. * STREAMING_BACKLOG_FILES: An estimate of the maximum number of outstanding files across all streams. This metric is in Public Preview.
- RUN_DURATION_SECONDS = "RUN_DURATION_SECONDS"¶
- STREAMING_BACKLOG_BYTES = "STREAMING_BACKLOG_BYTES"¶
- STREAMING_BACKLOG_FILES = "STREAMING_BACKLOG_FILES"¶
- STREAMING_BACKLOG_RECORDS = "STREAMING_BACKLOG_RECORDS"¶
- STREAMING_BACKLOG_SECONDS = "STREAMING_BACKLOG_SECONDS"¶
- class databricks.sdk.service.jobs.JobsHealthOperator¶
Specifies the operator used to compare the health metric value with the specified threshold.
- GREATER_THAN = "GREATER_THAN"¶
- class databricks.sdk.service.jobs.JobsHealthRule(metric: 'JobsHealthMetric', op: 'JobsHealthOperator', value: 'int')¶
- metric: JobsHealthMetric¶
- value: int¶
Specifies the threshold value that the health metric should obey to satisfy the health rule.
- as_dict() dict¶
Serializes the JobsHealthRule into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobsHealthRule into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobsHealthRule¶
Deserializes the JobsHealthRule from a dictionary.
- class databricks.sdk.service.jobs.JobsHealthRules(rules: List[JobsHealthRule] | None = None)¶
An optional set of health rules that can be defined for this job.
- rules: List[JobsHealthRule] | None = None¶
- as_dict() dict¶
Serializes the JobsHealthRules into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the JobsHealthRules into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) JobsHealthRules¶
Deserializes the JobsHealthRules from a dictionary.
- class databricks.sdk.service.jobs.ListJobComplianceForPolicyResponse(jobs: 'Optional[List[JobCompliance]]' = None, next_page_token: 'Optional[str]' = None, prev_page_token: 'Optional[str]' = None)¶
- jobs: List[JobCompliance] | None = None¶
A list of jobs and their policy compliance statuses.
- next_page_token: str | None = None¶
This field represents the pagination token to retrieve the next page of results. If this field is not in the response, it means no further results for the request.
- prev_page_token: str | None = None¶
This field represents the pagination token to retrieve the previous page of results. If this field is not in the response, it means no further results for the request.
- as_dict() dict¶
Serializes the ListJobComplianceForPolicyResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListJobComplianceForPolicyResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListJobComplianceForPolicyResponse¶
Deserializes the ListJobComplianceForPolicyResponse from a dictionary.
- class databricks.sdk.service.jobs.ListJobsResponse(has_more: bool | None = None, jobs: List[BaseJob] | None = None, next_page_token: str | None = None, prev_page_token: str | None = None)¶
List of jobs was retrieved successfully.
- has_more: bool | None = None¶
If true, additional jobs matching the provided filter are available for listing.
- jobs: List[BaseJob] | None = None¶
The list of jobs. Only included in the response if there are jobs to list.
- next_page_token: str | None = None¶
A token that can be used to list the next page of jobs (if applicable).
- prev_page_token: str | None = None¶
A token that can be used to list the previous page of jobs (if applicable).
- as_dict() dict¶
Serializes the ListJobsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListJobsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListJobsResponse¶
Deserializes the ListJobsResponse from a dictionary.
- class databricks.sdk.service.jobs.ListRunsResponse(has_more: bool | None = None, next_page_token: str | None = None, prev_page_token: str | None = None, runs: List[BaseRun] | None = None)¶
List of runs was retrieved successfully.
- has_more: bool | None = None¶
If true, additional runs matching the provided filter are available for listing.
- next_page_token: str | None = None¶
A token that can be used to list the next page of runs (if applicable).
- prev_page_token: str | None = None¶
A token that can be used to list the previous page of runs (if applicable).
- runs: List[BaseRun] | None = None¶
A list of runs, from most recently started to least. Only included in the response if there are runs to list.
- as_dict() dict¶
Serializes the ListRunsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListRunsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListRunsResponse¶
Deserializes the ListRunsResponse from a dictionary.
- class databricks.sdk.service.jobs.ModelTriggerConfiguration(condition: 'ModelTriggerConfigurationCondition', aliases: 'Optional[List[str]]' = None, min_time_between_triggers_seconds: 'Optional[int]' = None, securable_name: 'Optional[str]' = None, wait_after_last_change_seconds: 'Optional[int]' = None)¶
- condition: ModelTriggerConfigurationCondition¶
The condition based on which to trigger a job run.
- aliases: List[str] | None = None¶
Aliases of the model versions to monitor. Can only be used in conjunction with condition MODEL_ALIAS_SET.
- min_time_between_triggers_seconds: int | None = None¶
If set, the trigger starts a run only after the specified amount of time has passed since the last time the trigger fired. The minimum allowed value is 60 seconds.
- securable_name: str | None = None¶
Name of the securable to monitor (“mycatalog.myschema.mymodel” in the case of model-level triggers, “mycatalog.myschema” in the case of schema-level triggers) or empty in the case of metastore-level triggers.
- wait_after_last_change_seconds: int | None = None¶
If set, the trigger starts a run only after no model updates have occurred for the specified time and can be used to wait for a series of model updates before triggering a run. The minimum allowed value is 60 seconds.
- as_dict() dict¶
Serializes the ModelTriggerConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ModelTriggerConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ModelTriggerConfiguration¶
Deserializes the ModelTriggerConfiguration from a dictionary.
- class databricks.sdk.service.jobs.ModelTriggerConfigurationCondition¶
- MODEL_ALIAS_SET = "MODEL_ALIAS_SET"¶
- MODEL_CREATED = "MODEL_CREATED"¶
- MODEL_VERSION_READY = "MODEL_VERSION_READY"¶
- class databricks.sdk.service.jobs.NotebookOutput(result: 'Optional[str]' = None, truncated: 'Optional[bool]' = None)¶
- result: str | None = None¶
The value passed to [dbutils.notebook.exit()](/notebooks/notebook-workflows.html#notebook-workflows-exit). Databricks restricts this API to return the first 5 MB of the value. For a larger result, your job can store the results in a cloud storage service. This field is absent if dbutils.notebook.exit() was never called.
- truncated: bool | None = None¶
Whether or not the result was truncated.
- as_dict() dict¶
Serializes the NotebookOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the NotebookOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) NotebookOutput¶
Deserializes the NotebookOutput from a dictionary.
- class databricks.sdk.service.jobs.NotebookTask(notebook_path: 'str', base_parameters: 'Optional[Dict[str, str]]' = None, source: 'Optional[Source]' = None, warehouse_id: 'Optional[str]' = None)¶
- notebook_path: str¶
The path of the notebook to be run in the Databricks workspace or remote repository. For notebooks stored in the Databricks workspace, the path must be absolute and begin with a slash. For notebooks stored in a remote repository, the path must be relative. This field is required.
- base_parameters: Dict[str, str] | None = None¶
Base parameters to be used for each run of this job. If the run is initiated by a call to :method:jobs/run Now with parameters specified, the two parameters maps are merged. If the same key is specified in base_parameters and in run-now, the value from run-now is used. Use [Task parameter variables] to set parameters containing information about job runs.
If the notebook takes a parameter that is not specified in the job’s base_parameters or the run-now override parameters, the default value from the notebook is used.
Retrieve these parameters in a notebook using [dbutils.widgets.get].
The JSON representation of this field cannot exceed 1MB.
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets
- source: Source | None = None¶
Optional location type of the notebook. When set to WORKSPACE, the notebook will be retrieved from the local Databricks workspace. When set to GIT, the notebook will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise. * WORKSPACE: Notebook is located in Databricks workspace. * GIT: Notebook is located in cloud Git provider.
- warehouse_id: str | None = None¶
Optional warehouse_id to run the notebook on a SQL warehouse. Classic SQL warehouses are NOT supported, please use serverless or pro SQL warehouses.
Note that SQL warehouses only support SQL cells; if the notebook contains non-SQL cells, the run will fail.
- as_dict() dict¶
Serializes the NotebookTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the NotebookTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) NotebookTask¶
Deserializes the NotebookTask from a dictionary.
- class databricks.sdk.service.jobs.OutputSchemaInfo(catalog_name: str | None = None, expiration_time: int | None = None, schema_name: str | None = None)¶
Stores the catalog name, schema name, and the output schema expiration time for the clean room run.
- catalog_name: str | None = None¶
- expiration_time: int | None = None¶
The expiration time for the output schema as a Unix timestamp in milliseconds.
- schema_name: str | None = None¶
- as_dict() dict¶
Serializes the OutputSchemaInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the OutputSchemaInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) OutputSchemaInfo¶
Deserializes the OutputSchemaInfo from a dictionary.
- class databricks.sdk.service.jobs.PerformanceTarget¶
PerformanceTarget defines how performant (lower latency) or cost efficient the execution of run on serverless compute should be. The performance mode on the job or pipeline should map to a performance setting that is passed to Cluster Manager (see cluster-common PerformanceTarget).
- PERFORMANCE_OPTIMIZED = "PERFORMANCE_OPTIMIZED"¶
- STANDARD = "STANDARD"¶
- class databricks.sdk.service.jobs.PeriodicTriggerConfiguration(interval: 'int', unit: 'PeriodicTriggerConfigurationTimeUnit')¶
- interval: int¶
The interval at which the trigger should run.
- unit: PeriodicTriggerConfigurationTimeUnit¶
The unit of time for the interval.
- as_dict() dict¶
Serializes the PeriodicTriggerConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PeriodicTriggerConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PeriodicTriggerConfiguration¶
Deserializes the PeriodicTriggerConfiguration from a dictionary.
- class databricks.sdk.service.jobs.PeriodicTriggerConfigurationTimeUnit¶
- DAYS = "DAYS"¶
- HOURS = "HOURS"¶
- WEEKS = "WEEKS"¶
- class databricks.sdk.service.jobs.PipelineParams(full_refresh: 'Optional[bool]' = None, full_refresh_selection: 'Optional[List[str]]' = None, refresh_flow_selection: 'Optional[List[str]]' = None, refresh_selection: 'Optional[List[str]]' = None, reset_checkpoint_selection: 'Optional[List[str]]' = None)¶
- full_refresh: bool | None = None¶
If true, triggers a full refresh on the spark declarative pipeline.
- full_refresh_selection: List[str] | None = None¶
A list of tables to update with fullRefresh.
- refresh_flow_selection: List[str] | None = None¶
Flow names to selectively refresh. These are unioned with other selective refresh options (refresh_selection, full_refresh_selection) to determine the final set of flows to refresh.
- refresh_selection: List[str] | None = None¶
A list of tables to update without fullRefresh.
- reset_checkpoint_selection: List[str] | None = None¶
A list of streaming flows to reset checkpoints without clearing data.
- as_dict() dict¶
Serializes the PipelineParams into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PipelineParams into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PipelineParams¶
Deserializes the PipelineParams from a dictionary.
- class databricks.sdk.service.jobs.PipelineTask(pipeline_id: 'str', full_refresh: 'Optional[bool]' = None, full_refresh_selection: 'Optional[List[str]]' = None, parameters: 'Optional[Dict[str, str]]' = None, refresh_flow_selection: 'Optional[List[str]]' = None, refresh_selection: 'Optional[List[str]]' = None, reset_checkpoint_selection: 'Optional[List[str]]' = None)¶
- pipeline_id: str¶
The full name of the pipeline task to execute.
- full_refresh: bool | None = None¶
If true, triggers a full refresh on the spark declarative pipeline.
- full_refresh_selection: List[str] | None = None¶
A list of tables to update with fullRefresh.
- parameters: Dict[str, str] | None = None¶
Key/value-map of parameters passed to the pipeline execution. Limited to 10k characters in total.
- refresh_flow_selection: List[str] | None = None¶
Flow names to selectively refresh. These are unioned with other selective refresh options (refresh_selection, full_refresh_selection) to determine the final set of flows to refresh.
- refresh_selection: List[str] | None = None¶
A list of tables to update without fullRefresh.
- reset_checkpoint_selection: List[str] | None = None¶
A list of streaming flows to reset checkpoints without clearing data.
- as_dict() dict¶
Serializes the PipelineTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PipelineTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PipelineTask¶
Deserializes the PipelineTask from a dictionary.
- class databricks.sdk.service.jobs.PowerBiModel(authentication_method: 'Optional[AuthenticationMethod]' = None, model_name: 'Optional[str]' = None, overwrite_existing: 'Optional[bool]' = None, storage_mode: 'Optional[StorageMode]' = None, workspace_name: 'Optional[str]' = None)¶
- authentication_method: AuthenticationMethod | None = None¶
How the published Power BI model authenticates to Databricks
- model_name: str | None = None¶
The name of the Power BI model
- overwrite_existing: bool | None = None¶
Whether to overwrite existing Power BI models
- storage_mode: StorageMode | None = None¶
The default storage mode of the Power BI model
- workspace_name: str | None = None¶
The name of the Power BI workspace of the model
- as_dict() dict¶
Serializes the PowerBiModel into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PowerBiModel into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PowerBiModel¶
Deserializes the PowerBiModel from a dictionary.
- class databricks.sdk.service.jobs.PowerBiTable(catalog: 'Optional[str]' = None, name: 'Optional[str]' = None, schema: 'Optional[str]' = None, storage_mode: 'Optional[StorageMode]' = None)¶
- catalog: str | None = None¶
The catalog name in Databricks
- name: str | None = None¶
The table name in Databricks
- schema: str | None = None¶
The schema name in Databricks
- storage_mode: StorageMode | None = None¶
The Power BI storage mode of the table
- as_dict() dict¶
Serializes the PowerBiTable into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PowerBiTable into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PowerBiTable¶
Deserializes the PowerBiTable from a dictionary.
- class databricks.sdk.service.jobs.PowerBiTask(connection_resource_name: 'Optional[str]' = None, power_bi_model: 'Optional[PowerBiModel]' = None, refresh_after_update: 'Optional[bool]' = None, tables: 'Optional[List[PowerBiTable]]' = None, warehouse_id: 'Optional[str]' = None)¶
- connection_resource_name: str | None = None¶
The resource name of the UC connection to authenticate from Databricks to Power BI
- power_bi_model: PowerBiModel | None = None¶
The semantic model to update
- refresh_after_update: bool | None = None¶
Whether the model should be refreshed after the update
- tables: List[PowerBiTable] | None = None¶
The tables to be exported to Power BI
- warehouse_id: str | None = None¶
The SQL warehouse ID to use as the Power BI data source
- as_dict() dict¶
Serializes the PowerBiTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PowerBiTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PowerBiTask¶
Deserializes the PowerBiTask from a dictionary.
- class databricks.sdk.service.jobs.PythonOperatorTask(main: 'Optional[str]' = None, parameters: 'Optional[List[PythonOperatorTaskParameter]]' = None)¶
- main: str | None = None¶
Fully qualified name of the main class or function. For example, my_project.my_function or my_project.MyOperator.
- parameters: List[PythonOperatorTaskParameter] | None = None¶
An ordered list of task parameters. TODO(JOBS-30885): Add limits for parameters.
- as_dict() dict¶
Serializes the PythonOperatorTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PythonOperatorTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PythonOperatorTask¶
Deserializes the PythonOperatorTask from a dictionary.
- class databricks.sdk.service.jobs.PythonOperatorTaskParameter(name: 'Optional[str]' = None, value: 'Optional[str]' = None)¶
- name: str | None = None¶
- value: str | None = None¶
- as_dict() dict¶
Serializes the PythonOperatorTaskParameter into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PythonOperatorTaskParameter into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PythonOperatorTaskParameter¶
Deserializes the PythonOperatorTaskParameter from a dictionary.
- class databricks.sdk.service.jobs.PythonWheelTask(package_name: 'str', entry_point: 'str', named_parameters: 'Optional[Dict[str, str]]' = None, parameters: 'Optional[List[str]]' = None)¶
- package_name: str¶
Name of the package to execute
- entry_point: str¶
Named entry point to use, if it does not exist in the metadata of the package it executes the function from the package directly using $packageName.$entryPoint()
- named_parameters: Dict[str, str] | None = None¶
Command-line parameters passed to Python wheel task in the form of [”–name=task”, “–data=dbfs:/path/to/data.json”]. Leave it empty if parameters is not null.
- parameters: List[str] | None = None¶
Command-line parameters passed to Python wheel task. Leave it empty if named_parameters is not null.
- as_dict() dict¶
Serializes the PythonWheelTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the PythonWheelTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) PythonWheelTask¶
Deserializes the PythonWheelTask from a dictionary.
- class databricks.sdk.service.jobs.QueueDetails(code: 'Optional[QueueDetailsCodeCode]' = None, message: 'Optional[str]' = None)¶
- code: QueueDetailsCodeCode | None = None¶
- message: str | None = None¶
A descriptive message with the queuing details. This field is unstructured, and its exact format is subject to change.
- as_dict() dict¶
Serializes the QueueDetails into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the QueueDetails into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueueDetails¶
Deserializes the QueueDetails from a dictionary.
- class databricks.sdk.service.jobs.QueueDetailsCodeCode¶
The reason for queuing the run. * ACTIVE_RUNS_LIMIT_REACHED: The run was queued due to reaching the workspace limit of active task runs. * MAX_CONCURRENT_RUNS_REACHED: The run was queued due to reaching the per-job limit of concurrent job runs. * ACTIVE_RUN_JOB_TASKS_LIMIT_REACHED: The run was queued due to reaching the workspace limit of active run job tasks.
- ACTIVE_RUNS_LIMIT_REACHED = "ACTIVE_RUNS_LIMIT_REACHED"¶
- ACTIVE_RUN_JOB_TASKS_LIMIT_REACHED = "ACTIVE_RUN_JOB_TASKS_LIMIT_REACHED"¶
- MAX_CONCURRENT_RUNS_REACHED = "MAX_CONCURRENT_RUNS_REACHED"¶
- class databricks.sdk.service.jobs.QueueSettings(enabled: 'bool')¶
- enabled: bool¶
If true, enable queueing for the job. This is a required field.
- as_dict() dict¶
Serializes the QueueSettings into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the QueueSettings into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) QueueSettings¶
Deserializes the QueueSettings from a dictionary.
- class databricks.sdk.service.jobs.RepairHistoryItem(effective_performance_target: 'Optional[PerformanceTarget]' = None, end_time: 'Optional[int]' = None, id: 'Optional[int]' = None, start_time: 'Optional[int]' = None, state: 'Optional[RunState]' = None, status: 'Optional[RunStatus]' = None, task_run_ids: 'Optional[List[int]]' = None, type: 'Optional[RepairHistoryItemType]' = None)¶
- effective_performance_target: PerformanceTarget | None = None¶
The actual performance target used by the serverless run during execution. This can differ from the client-set performance target on the request depending on whether the performance mode is supported by the job type.
STANDARD: Enables cost-efficient execution of serverless workloads. *
PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
- end_time: int | None = None¶
The end time of the (repaired) run.
- id: int | None = None¶
The ID of the repair. Only returned for the items that represent a repair in repair_history.
- start_time: int | None = None¶
The start time of the (repaired) run.
- task_run_ids: List[int] | None = None¶
The run IDs of the task runs that ran as part of this repair history item.
- type: RepairHistoryItemType | None = None¶
The repair history item type. Indicates whether a run is the original run or a repair run.
- as_dict() dict¶
Serializes the RepairHistoryItem into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RepairHistoryItem into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RepairHistoryItem¶
Deserializes the RepairHistoryItem from a dictionary.
- class databricks.sdk.service.jobs.RepairHistoryItemType¶
The repair history item type. Indicates whether a run is the original run or a repair run.
- ORIGINAL = "ORIGINAL"¶
- REPAIR = "REPAIR"¶
- class databricks.sdk.service.jobs.RepairRunResponse(repair_id: int | None = None)¶
Run repair was initiated.
- repair_id: int | None = None¶
The ID of the repair. Must be provided in subsequent repairs using the latest_repair_id field to ensure sequential repairs.
- as_dict() dict¶
Serializes the RepairRunResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RepairRunResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RepairRunResponse¶
Deserializes the RepairRunResponse from a dictionary.
- class databricks.sdk.service.jobs.ResolvedConditionTaskValues(left: 'Optional[str]' = None, right: 'Optional[str]' = None)¶
- left: str | None = None¶
- right: str | None = None¶
- as_dict() dict¶
Serializes the ResolvedConditionTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedConditionTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedConditionTaskValues¶
Deserializes the ResolvedConditionTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedDbtTaskValues(commands: 'Optional[List[str]]' = None)¶
- commands: List[str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedDbtTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedDbtTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedDbtTaskValues¶
Deserializes the ResolvedDbtTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedNotebookTaskValues(base_parameters: 'Optional[Dict[str, str]]' = None)¶
- base_parameters: Dict[str, str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedNotebookTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedNotebookTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedNotebookTaskValues¶
Deserializes the ResolvedNotebookTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedParamPairValues(parameters: 'Optional[Dict[str, str]]' = None)¶
- parameters: Dict[str, str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedParamPairValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedParamPairValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedParamPairValues¶
Deserializes the ResolvedParamPairValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedPipelineTaskValues(parameters: 'Optional[Dict[str, str]]' = None)¶
- parameters: Dict[str, str] | None = None¶
Key/value-map of parameters passed to the pipeline execution. Limited to 10k characters in total.
- as_dict() dict¶
Serializes the ResolvedPipelineTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedPipelineTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedPipelineTaskValues¶
Deserializes the ResolvedPipelineTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedPythonWheelTaskValues(named_parameters: 'Optional[Dict[str, str]]' = None, parameters: 'Optional[List[str]]' = None)¶
- named_parameters: Dict[str, str] | None = None¶
- parameters: List[str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedPythonWheelTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedPythonWheelTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedPythonWheelTaskValues¶
Deserializes the ResolvedPythonWheelTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedRunJobTaskValues(job_parameters: 'Optional[Dict[str, str]]' = None, parameters: 'Optional[Dict[str, str]]' = None)¶
- job_parameters: Dict[str, str] | None = None¶
- parameters: Dict[str, str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedRunJobTaskValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedRunJobTaskValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedRunJobTaskValues¶
Deserializes the ResolvedRunJobTaskValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedStringParamsValues(parameters: 'Optional[List[str]]' = None)¶
- parameters: List[str] | None = None¶
- as_dict() dict¶
Serializes the ResolvedStringParamsValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedStringParamsValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedStringParamsValues¶
Deserializes the ResolvedStringParamsValues from a dictionary.
- class databricks.sdk.service.jobs.ResolvedValues(condition_task: 'Optional[ResolvedConditionTaskValues]' = None, dbt_task: 'Optional[ResolvedDbtTaskValues]' = None, notebook_task: 'Optional[ResolvedNotebookTaskValues]' = None, pipeline_task: 'Optional[ResolvedPipelineTaskValues]' = None, python_wheel_task: 'Optional[ResolvedPythonWheelTaskValues]' = None, run_job_task: 'Optional[ResolvedRunJobTaskValues]' = None, simulation_task: 'Optional[ResolvedParamPairValues]' = None, spark_jar_task: 'Optional[ResolvedStringParamsValues]' = None, spark_python_task: 'Optional[ResolvedStringParamsValues]' = None, spark_submit_task: 'Optional[ResolvedStringParamsValues]' = None, sql_task: 'Optional[ResolvedParamPairValues]' = None)¶
- condition_task: ResolvedConditionTaskValues | None = None¶
- dbt_task: ResolvedDbtTaskValues | None = None¶
- notebook_task: ResolvedNotebookTaskValues | None = None¶
- pipeline_task: ResolvedPipelineTaskValues | None = None¶
- python_wheel_task: ResolvedPythonWheelTaskValues | None = None¶
- run_job_task: ResolvedRunJobTaskValues | None = None¶
- simulation_task: ResolvedParamPairValues | None = None¶
- spark_jar_task: ResolvedStringParamsValues | None = None¶
- spark_python_task: ResolvedStringParamsValues | None = None¶
- spark_submit_task: ResolvedStringParamsValues | None = None¶
- sql_task: ResolvedParamPairValues | None = None¶
- as_dict() dict¶
Serializes the ResolvedValues into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ResolvedValues into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ResolvedValues¶
Deserializes the ResolvedValues from a dictionary.
- class databricks.sdk.service.jobs.Run(attempt_number: int | None = None, cleanup_duration: int | None = None, cluster_instance: ClusterInstance | None = None, cluster_spec: ClusterSpec | None = None, creator_user_name: str | None = None, description: str | None = None, effective_performance_target: PerformanceTarget | None = None, effective_usage_policy_id: str | None = None, end_time: int | None = None, execution_duration: int | None = None, git_source: GitSource | None = None, has_more: bool | None = None, iterations: List[RunTask] | None = None, job_clusters: List[JobCluster] | None = None, job_id: int | None = None, job_parameters: List[JobParameter] | None = None, job_run_id: int | None = None, next_page_token: str | None = None, number_in_job: int | None = None, original_attempt_run_id: int | None = None, overriding_parameters: RunParameters | None = None, queue_duration: int | None = None, repair_history: List[RepairHistoryItem] | None = None, run_duration: int | None = None, run_id: int | None = None, run_name: str | None = None, run_page_url: str | None = None, run_type: RunType | None = None, schedule: CronSchedule | None = None, setup_duration: int | None = None, start_time: int | None = None, state: RunState | None = None, status: RunStatus | None = None, tasks: List[RunTask] | None = None, trigger: TriggerType | None = None, trigger_info: TriggerInfo | None = None)¶
Run was retrieved successfully
- attempt_number: int | None = None¶
The sequence number of this run attempt for a triggered job run. The initial attempt of a run has an attempt_number of 0. If the initial run attempt fails, and the job has a retry policy (max_retries > 0), subsequent runs are created with an original_attempt_run_id of the original attempt’s ID and an incrementing attempt_number. Runs are retried only until they succeed, and the maximum attempt_number is the same as the max_retries value for the job.
- cleanup_duration: int | None = None¶
The time in milliseconds it took to terminate the cluster and clean up any associated artifacts. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The cleanup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- cluster_instance: ClusterInstance | None = None¶
The cluster used for this run. If the run is specified to use a new cluster, this field is set once the Jobs service has requested a cluster for the run.
- cluster_spec: ClusterSpec | None = None¶
A snapshot of the job’s cluster specification when this run was created.
- creator_user_name: str | None = None¶
The creator user name. This field won’t be included in the response if the user has already been deleted.
- description: str | None = None¶
Description of the run
- effective_performance_target: PerformanceTarget | None = None¶
The actual performance target used by the serverless run during execution. This can differ from the client-set performance target on the request depending on whether the performance mode is supported by the job type.
STANDARD: Enables cost-efficient execution of serverless workloads. *
PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
- effective_usage_policy_id: str | None = None¶
The id of the usage policy used by this run for cost attribution purposes.
- end_time: int | None = None¶
The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This field is set to 0 if the job is still running.
- execution_duration: int | None = None¶
The time in milliseconds it took to execute the commands in the JAR or notebook until they completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The execution_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- git_source: GitSource | None = None¶
An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks.
If git_source is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting source to WORKSPACE on the task.
Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, git_source must be defined on the job.
- has_more: bool | None = None¶
Indicates if the run has more array properties (tasks, job_clusters) that are not shown. They can be accessed via :method:jobs/getrun endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests with expand_tasks=true.
- iterations: List[RunTask] | None = None¶
Only populated by for-each iterations. The parent for-each task is located in tasks array.
- job_clusters: List[JobCluster] | None = None¶
A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings. If more than 100 job clusters are available, you can paginate through them using :method:jobs/getrun.
- job_id: int | None = None¶
The canonical identifier of the job that contains this run.
- job_parameters: List[JobParameter] | None = None¶
Job-level parameters used in the run
- job_run_id: int | None = None¶
ID of the job run that this run belongs to. For legacy and single-task job runs the field is populated with the job run ID. For task runs, the field is populated with the ID of the job run that the task run belongs to.
- next_page_token: str | None = None¶
A token that can be used to list the next page of array properties.
- number_in_job: int | None = None¶
A unique identifier for this job run. This is set to the same value as run_id.
- original_attempt_run_id: int | None = None¶
If this run is a retry of a prior run attempt, this field contains the run_id of the original attempt; otherwise, it is the same as the run_id.
- overriding_parameters: RunParameters | None = None¶
The parameters used for this run.
- queue_duration: int | None = None¶
The time in milliseconds that the run has spent in the queue.
- repair_history: List[RepairHistoryItem] | None = None¶
The repair history of the run.
- run_duration: int | None = None¶
The time in milliseconds it took the job run and all of its repairs to finish.
- run_id: int | None = None¶
The canonical identifier of the run. This ID is unique across all runs of all jobs.
- run_name: str | None = None¶
An optional name for the run. The maximum length is 4096 bytes in UTF-8 encoding.
- run_page_url: str | None = None¶
The URL to the detail page of the run.
- schedule: CronSchedule | None = None¶
The cron schedule that triggered this run if it was triggered by the periodic scheduler.
- setup_duration: int | None = None¶
The time in milliseconds it took to set up the cluster. For runs that run on new clusters this is the cluster creation time, for runs that run on existing clusters this time should be very short. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The setup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- start_time: int | None = None¶
The time at which this run was started in epoch milliseconds (milliseconds since 1/1/1970 UTC). This may not be the time when the job task starts executing, for example, if the job is scheduled to run on a new cluster, this is the time the cluster creation call is issued.
- tasks: List[RunTask] | None = None¶
The list of tasks performed by the run. Each task has its own run_id which you can use to call JobsGetOutput to retrieve the run results. If more than 100 tasks are available, you can paginate through them using :method:jobs/getrun. Use the next_page_token field at the object root to determine if more results are available.
- trigger: TriggerType | None = None¶
- trigger_info: TriggerInfo | None = None¶
- as_dict() dict¶
Serializes the Run into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Run into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.RunConditionTask(op: 'ConditionTaskOp', left: 'str', right: 'str', outcome: 'Optional[str]' = None)¶
- op: ConditionTaskOp¶
EQUAL_TO, NOT_EQUAL operators perform string comparison of their operands. This means that
“12.0” == “12” will evaluate to false. * GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL operators perform numeric comparison of their operands. “12.0” >= “12” will evaluate to true, “10.0” >= “12” will evaluate to false.
The boolean comparison to task values can be implemented with operators EQUAL_TO, NOT_EQUAL. If a task value was set to a boolean value, it will be serialized to “true” or “false” for the comparison.
- left: str¶
The left operand of the condition task. Can be either a string value or a job state or parameter reference.
- right: str¶
The right operand of the condition task. Can be either a string value or a job state or parameter reference.
- outcome: str | None = None¶
The condition expression evaluation result. Filled in if the task was successfully completed. Can be “true” or “false”
- as_dict() dict¶
Serializes the RunConditionTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunConditionTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunConditionTask¶
Deserializes the RunConditionTask from a dictionary.
- class databricks.sdk.service.jobs.RunForEachTask(inputs: 'str', task: 'Task', concurrency: 'Optional[int]' = None, stats: 'Optional[ForEachStats]' = None)¶
- inputs: str¶
Array for task to iterate on. This can be a JSON string or a reference to an array parameter.
- concurrency: int | None = None¶
An optional maximum allowed number of concurrent runs of the task. Set this value if you want to be able to execute multiple runs of the task concurrently.
- stats: ForEachStats | None = None¶
Read only field. Populated for GetRun and ListRuns RPC calls and stores the execution stats of a For each task.
- as_dict() dict¶
Serializes the RunForEachTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunForEachTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunForEachTask¶
Deserializes the RunForEachTask from a dictionary.
- class databricks.sdk.service.jobs.RunIf¶
An optional value indicating the condition that determines whether the task should be run once its dependencies have been completed. When omitted, defaults to ALL_SUCCESS. Possible values are: * ALL_SUCCESS: All dependencies have executed and succeeded * AT_LEAST_ONE_SUCCESS: At least one dependency has succeeded * NONE_FAILED: None of the dependencies have failed and at least one was executed * ALL_DONE: All dependencies have been completed * AT_LEAST_ONE_FAILED: At least one dependency failed * ALL_FAILED: ALl dependencies have failed
- ALL_DONE = "ALL_DONE"¶
- ALL_FAILED = "ALL_FAILED"¶
- ALL_SUCCESS = "ALL_SUCCESS"¶
- AT_LEAST_ONE_FAILED = "AT_LEAST_ONE_FAILED"¶
- AT_LEAST_ONE_SUCCESS = "AT_LEAST_ONE_SUCCESS"¶
- NONE_FAILED = "NONE_FAILED"¶
- class databricks.sdk.service.jobs.RunJobOutput(run_id: 'Optional[int]' = None)¶
- run_id: int | None = None¶
The run id of the triggered job run
- as_dict() dict¶
Serializes the RunJobOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunJobOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunJobOutput¶
Deserializes the RunJobOutput from a dictionary.
- class databricks.sdk.service.jobs.RunJobTask(job_id: 'int', dbt_commands: 'Optional[List[str]]' = None, jar_params: 'Optional[List[str]]' = None, job_parameters: 'Optional[Dict[str, str]]' = None, notebook_params: 'Optional[Dict[str, str]]' = None, pipeline_params: 'Optional[PipelineParams]' = None, python_named_params: 'Optional[Dict[str, str]]' = None, python_params: 'Optional[List[str]]' = None, spark_submit_params: 'Optional[List[str]]' = None, sql_params: 'Optional[Dict[str, str]]' = None)¶
- job_id: int¶
ID of the job to trigger.
- dbt_commands: List[str] | None = None¶
An array of commands to execute for jobs with the dbt task, for example “dbt_commands”: [“dbt deps”, “dbt seed”, “dbt deps”, “dbt seed”, “dbt run”]
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- jar_params: List[str] | None = None¶
A list of parameters for jobs with Spark JAR tasks, for example “jar_params”: [“john doe”, “35”]. The parameters are used to invoke the main function of the main class specified in the Spark JAR task. If not specified upon run-now, it defaults to an empty list. jar_params cannot be specified in conjunction with notebook_params. The JSON representation of this field (for example {“jar_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- job_parameters: Dict[str, str] | None = None¶
Job-level parameters used to trigger the job.
- notebook_params: Dict[str, str] | None = None¶
A map from keys to values for jobs with notebook task, for example “notebook_params”: {“name”: “john doe”, “age”: “35”}. The map is passed to the notebook and is accessible through the [dbutils.widgets.get] function.
If not specified upon run-now, the triggered run uses the job’s base parameters.
notebook_params cannot be specified in conjunction with jar_params.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
The JSON representation of this field (for example {“notebook_params”:{“name”:”john doe”,”age”:”35”}}) cannot exceed 10,000 bytes.
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html [job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- pipeline_params: PipelineParams | None = None¶
Controls whether the pipeline should perform a full refresh
- python_named_params: Dict[str, str] | None = None¶
- python_params: List[str] | None = None¶
A list of parameters for jobs with Python tasks, for example “python_params”: [“john doe”, “35”]. The parameters are passed to Python file as command-line parameters. If specified upon run-now, it would overwrite the parameters specified in job setting. The JSON representation of this field (for example {“python_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
Important
These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- spark_submit_params: List[str] | None = None¶
A list of parameters for jobs with spark submit task, for example “spark_submit_params”: [”–class”, “org.apache.spark.examples.SparkPi”]. The parameters are passed to spark-submit script as command-line parameters. If specified upon run-now, it would overwrite the parameters specified in job setting. The JSON representation of this field (for example {“python_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
Important
These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- sql_params: Dict[str, str] | None = None¶
A map from keys to values for jobs with SQL task, for example “sql_params”: {“name”: “john doe”, “age”: “35”}. The SQL alert task does not support custom parameters.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- as_dict() dict¶
Serializes the RunJobTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunJobTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunJobTask¶
Deserializes the RunJobTask from a dictionary.
- class databricks.sdk.service.jobs.RunLifeCycleState¶
A value indicating the run’s lifecycle state. The possible values are: * QUEUED: The run is queued. * PENDING: The run is waiting to be executed while the cluster and execution context are being prepared. * RUNNING: The task of this run is being executed. * TERMINATING: The task of this run has completed, and the cluster and execution context are being cleaned up. * TERMINATED: The task of this run has completed, and the cluster and execution context have been cleaned up. This state is terminal. * SKIPPED: This run was aborted because a previous run of the same job was already active. This state is terminal. * INTERNAL_ERROR: An exceptional state that indicates a failure in the Jobs service, such as network failure over a long period. If a run on a new cluster ends in the INTERNAL_ERROR state, the Jobs service terminates the cluster as soon as possible. This state is terminal. * BLOCKED: The run is blocked on an upstream dependency. * WAITING_FOR_RETRY: The run is waiting for a retry.
- BLOCKED = "BLOCKED"¶
- INTERNAL_ERROR = "INTERNAL_ERROR"¶
- PENDING = "PENDING"¶
- QUEUED = "QUEUED"¶
- RUNNING = "RUNNING"¶
- SKIPPED = "SKIPPED"¶
- TERMINATED = "TERMINATED"¶
- TERMINATING = "TERMINATING"¶
- WAITING_FOR_RETRY = "WAITING_FOR_RETRY"¶
- class databricks.sdk.service.jobs.RunLifecycleStateV2State¶
The current state of the run.
- BLOCKED = "BLOCKED"¶
- PENDING = "PENDING"¶
- QUEUED = "QUEUED"¶
- RUNNING = "RUNNING"¶
- TERMINATED = "TERMINATED"¶
- TERMINATING = "TERMINATING"¶
- WAITING = "WAITING"¶
- class databricks.sdk.service.jobs.RunNowResponse(number_in_job: int | None = None, run_id: int | None = None)¶
Run was started successfully.
- number_in_job: int | None = None¶
A unique identifier for this job run. This is set to the same value as run_id.
- run_id: int | None = None¶
The globally unique ID of the newly triggered run.
- as_dict() dict¶
Serializes the RunNowResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunNowResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunNowResponse¶
Deserializes the RunNowResponse from a dictionary.
- class databricks.sdk.service.jobs.RunOutput(alert_output: AlertTaskOutput | None = None, clean_rooms_notebook_output: CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput | None = None, dashboard_output: DashboardTaskOutput | None = None, dbt_cloud_output: DbtCloudTaskOutput | None = None, dbt_output: DbtOutput | None = None, dbt_platform_output: DbtPlatformTaskOutput | None = None, error: str | None = None, error_trace: str | None = None, info: str | None = None, logs: str | None = None, logs_truncated: bool | None = None, metadata: Run | None = None, notebook_output: NotebookOutput | None = None, run_job_output: RunJobOutput | None = None, sql_output: SqlOutput | None = None)¶
Run output was retrieved successfully.
- alert_output: AlertTaskOutput | None = None¶
The output of an alert task, if available
- clean_rooms_notebook_output: CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput | None = None¶
The output of a clean rooms notebook task, if available
- dashboard_output: DashboardTaskOutput | None = None¶
The output of a dashboard task, if available
- dbt_cloud_output: DbtCloudTaskOutput | None = None¶
Deprecated in favor of the new dbt_platform_output
- dbt_platform_output: DbtPlatformTaskOutput | None = None¶
- error: str | None = None¶
An error message indicating why a task failed or why output is not available. The message is unstructured, and its exact format is subject to change.
- error_trace: str | None = None¶
If there was an error executing the run, this field contains any available stack traces.
- info: str | None = None¶
- logs: str | None = None¶
The output from tasks that write to standard streams (stdout/stderr) such as spark_jar_task, spark_python_task, python_wheel_task.
It’s not supported for the notebook_task, pipeline_task or spark_submit_task.
Databricks restricts this API to return the last 5 MB of these logs.
- logs_truncated: bool | None = None¶
Whether the logs are truncated.
- notebook_output: NotebookOutput | None = None¶
The output of a notebook task, if available. A notebook task that terminates (either successfully or with a failure) without calling dbutils.notebook.exit() is considered to have an empty output. This field is set but its result value is empty. Databricks restricts this API to return the first 5 MB of the output. To return a larger result, use the [ClusterLogConf] field to configure log storage for the job cluster.
[ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf
- run_job_output: RunJobOutput | None = None¶
The output of a run job task, if available
- as_dict() dict¶
Serializes the RunOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunOutput into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.RunParameters(dbt_commands: 'Optional[List[str]]' = None, jar_params: 'Optional[List[str]]' = None, notebook_params: 'Optional[Dict[str, str]]' = None, pipeline_params: 'Optional[PipelineParams]' = None, python_named_params: 'Optional[Dict[str, str]]' = None, python_params: 'Optional[List[str]]' = None, spark_submit_params: 'Optional[List[str]]' = None, sql_params: 'Optional[Dict[str, str]]' = None)¶
- dbt_commands: List[str] | None = None¶
An array of commands to execute for jobs with the dbt task, for example “dbt_commands”: [“dbt deps”, “dbt seed”, “dbt deps”, “dbt seed”, “dbt run”]
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- jar_params: List[str] | None = None¶
A list of parameters for jobs with Spark JAR tasks, for example “jar_params”: [“john doe”, “35”]. The parameters are used to invoke the main function of the main class specified in the Spark JAR task. If not specified upon run-now, it defaults to an empty list. jar_params cannot be specified in conjunction with notebook_params. The JSON representation of this field (for example {“jar_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- notebook_params: Dict[str, str] | None = None¶
A map from keys to values for jobs with notebook task, for example “notebook_params”: {“name”: “john doe”, “age”: “35”}. The map is passed to the notebook and is accessible through the [dbutils.widgets.get] function.
If not specified upon run-now, the triggered run uses the job’s base parameters.
notebook_params cannot be specified in conjunction with jar_params.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
The JSON representation of this field (for example {“notebook_params”:{“name”:”john doe”,”age”:”35”}}) cannot exceed 10,000 bytes.
[dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html [job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- pipeline_params: PipelineParams | None = None¶
Controls whether the pipeline should perform a full refresh
- python_named_params: Dict[str, str] | None = None¶
- python_params: List[str] | None = None¶
A list of parameters for jobs with Python tasks, for example “python_params”: [“john doe”, “35”]. The parameters are passed to Python file as command-line parameters. If specified upon run-now, it would overwrite the parameters specified in job setting. The JSON representation of this field (for example {“python_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
Important
These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- spark_submit_params: List[str] | None = None¶
A list of parameters for jobs with spark submit task, for example “spark_submit_params”: [”–class”, “org.apache.spark.examples.SparkPi”]. The parameters are passed to spark-submit script as command-line parameters. If specified upon run-now, it would overwrite the parameters specified in job setting. The JSON representation of this field (for example {“python_params”:[“john doe”,”35”]}) cannot exceed 10,000 bytes.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
Important
These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- sql_params: Dict[str, str] | None = None¶
A map from keys to values for jobs with SQL task, for example “sql_params”: {“name”: “john doe”, “age”: “35”}. The SQL alert task does not support custom parameters.
⚠ Deprecation note Use [job parameters] to pass information down to tasks.
[job parameters]: https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown
- as_dict() dict¶
Serializes the RunParameters into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunParameters into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) RunParameters¶
Deserializes the RunParameters from a dictionary.
- class databricks.sdk.service.jobs.RunResultState¶
A value indicating the run’s result. The possible values are: * SUCCESS: The task completed successfully. * FAILED: The task completed with an error. * TIMEDOUT: The run was stopped after reaching the timeout. * CANCELED: The run was canceled at user request. * MAXIMUM_CONCURRENT_RUNS_REACHED: The run was skipped because the maximum concurrent runs were reached. * EXCLUDED: The run was skipped because the necessary conditions were not met. * SUCCESS_WITH_FAILURES: The job run completed successfully with some failures; leaf tasks were successful. * UPSTREAM_FAILED: The run was skipped because of an upstream failure. * UPSTREAM_CANCELED: The run was skipped because an upstream task was canceled. * DISABLED: The run was skipped because it was disabled explicitly by the user.
- CANCELED = "CANCELED"¶
- DISABLED = "DISABLED"¶
- EXCLUDED = "EXCLUDED"¶
- FAILED = "FAILED"¶
- MAXIMUM_CONCURRENT_RUNS_REACHED = "MAXIMUM_CONCURRENT_RUNS_REACHED"¶
- SUCCESS = "SUCCESS"¶
- SUCCESS_WITH_FAILURES = "SUCCESS_WITH_FAILURES"¶
- TIMEDOUT = "TIMEDOUT"¶
- UPSTREAM_CANCELED = "UPSTREAM_CANCELED"¶
- UPSTREAM_FAILED = "UPSTREAM_FAILED"¶
- class databricks.sdk.service.jobs.RunState(life_cycle_state: RunLifeCycleState | None = None, queue_reason: str | None = None, result_state: RunResultState | None = None, state_message: str | None = None, user_cancelled_or_timedout: bool | None = None)¶
The current state of the run.
- life_cycle_state: RunLifeCycleState | None = None¶
A value indicating the run’s current lifecycle state. This field is always available in the response. Note: Additional states might be introduced in future releases.
- queue_reason: str | None = None¶
The reason indicating why the run was queued.
- result_state: RunResultState | None = None¶
A value indicating the run’s result. This field is only available for terminal lifecycle states. Note: Additional states might be introduced in future releases.
- state_message: str | None = None¶
A descriptive message for the current state. This field is unstructured, and its exact format is subject to change.
- user_cancelled_or_timedout: bool | None = None¶
A value indicating whether a run was canceled manually by a user or by the scheduler because the run timed out.
- as_dict() dict¶
Serializes the RunState into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunState into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.RunStatus(queue_details: QueueDetails | None = None, state: RunLifecycleStateV2State | None = None, termination_details: TerminationDetails | None = None)¶
The current status of the run
- queue_details: QueueDetails | None = None¶
If the run was queued, details about the reason for queuing the run.
- state: RunLifecycleStateV2State | None = None¶
- termination_details: TerminationDetails | None = None¶
If the run is in a TERMINATING or TERMINATED state, details about the reason for terminating the run.
- as_dict() dict¶
Serializes the RunStatus into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunStatus into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.RunTask(task_key: str, alert_task: AlertTask | None = None, attempt_number: int | None = None, clean_rooms_notebook_task: CleanRoomsNotebookTask | None = None, cleanup_duration: int | None = None, cluster_instance: ClusterInstance | None = None, compute: Compute | None = None, condition_task: RunConditionTask | None = None, dashboard_task: DashboardTask | None = None, dbt_cloud_task: DbtCloudTask | None = None, dbt_platform_task: DbtPlatformTask | None = None, dbt_task: DbtTask | None = None, depends_on: List[TaskDependency] | None = None, description: str | None = None, disable_auto_optimization: bool | None = None, disabled: bool | None = None, effective_performance_target: PerformanceTarget | None = None, email_notifications: JobEmailNotifications | None = None, end_time: int | None = None, environment_key: str | None = None, execution_duration: int | None = None, existing_cluster_id: str | None = None, for_each_task: RunForEachTask | None = None, gen_ai_compute_task: GenAiComputeTask | None = None, git_source: GitSource | None = None, job_cluster_key: str | None = None, libraries: List[Library] | None = None, max_retries: int | None = None, min_retry_interval_millis: int | None = None, new_cluster: ClusterSpec | None = None, notebook_task: NotebookTask | None = None, notification_settings: TaskNotificationSettings | None = None, pipeline_task: PipelineTask | None = None, power_bi_task: PowerBiTask | None = None, python_operator_task: PythonOperatorTask | None = None, python_wheel_task: PythonWheelTask | None = None, queue_duration: int | None = None, resolved_values: ResolvedValues | None = None, retry_on_timeout: bool | None = None, run_duration: int | None = None, run_id: int | None = None, run_if: RunIf | None = None, run_job_task: RunJobTask | None = None, run_page_url: str | None = None, setup_duration: int | None = None, spark_jar_task: SparkJarTask | None = None, spark_python_task: SparkPythonTask | None = None, spark_submit_task: SparkSubmitTask | None = None, sql_task: SqlTask | None = None, start_time: int | None = None, state: RunState | None = None, status: RunStatus | None = None, timeout_seconds: int | None = None, webhook_notifications: WebhookNotifications | None = None)¶
Used when outputting a child run, in GetRun or ListRuns.
- task_key: str¶
A unique name for the task. This field is used to refer to this task from other tasks. This field is required and must be unique within its parent job. On Update or Reset, this field is used to reference the tasks to be updated or reset.
- alert_task: AlertTask | None = None¶
The task evaluates a Databricks alert and sends notifications to subscribers when the alert_task field is present.
- attempt_number: int | None = None¶
The sequence number of this run attempt for a triggered job run. The initial attempt of a run has an attempt_number of 0. If the initial run attempt fails, and the job has a retry policy (max_retries > 0), subsequent runs are created with an original_attempt_run_id of the original attempt’s ID and an incrementing attempt_number. Runs are retried only until they succeed, and the maximum attempt_number is the same as the max_retries value for the job.
- clean_rooms_notebook_task: CleanRoomsNotebookTask | None = None¶
The task runs a [clean rooms] notebook when the clean_rooms_notebook_task field is present.
[clean rooms]: https://docs.databricks.com/clean-rooms/index.html
- cleanup_duration: int | None = None¶
The time in milliseconds it took to terminate the cluster and clean up any associated artifacts. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The cleanup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- cluster_instance: ClusterInstance | None = None¶
The cluster used for this run. If the run is specified to use a new cluster, this field is set once the Jobs service has requested a cluster for the run.
- condition_task: RunConditionTask | None = None¶
The task evaluates a condition that can be used to control the execution of other tasks when the condition_task field is present. The condition task does not require a cluster to execute and does not support retries or notifications.
- dashboard_task: DashboardTask | None = None¶
The task refreshes a dashboard and sends a snapshot to subscribers.
- dbt_cloud_task: DbtCloudTask | None = None¶
Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task
- dbt_platform_task: DbtPlatformTask | None = None¶
- dbt_task: DbtTask | None = None¶
The task runs one or more dbt commands when the dbt_task field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse.
- depends_on: List[TaskDependency] | None = None¶
An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete successfully before executing this task. The key is task_key, and the value is the name assigned to the dependent task.
- description: str | None = None¶
An optional description for this task.
- disable_auto_optimization: bool | None = None¶
An option to disable auto optimization in serverless
- disabled: bool | None = None¶
An optional flag to disable the task. If set to true, the task will not run even if it is part of a job.
- effective_performance_target: PerformanceTarget | None = None¶
The actual performance target used by the serverless run during execution. This can differ from the client-set performance target on the request depending on whether the performance mode is supported by the job type.
STANDARD: Enables cost-efficient execution of serverless workloads. *
PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
- email_notifications: JobEmailNotifications | None = None¶
An optional set of email addresses notified when the task run begins or completes. The default behavior is to not send any emails.
- end_time: int | None = None¶
The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This field is set to 0 if the job is still running.
- environment_key: str | None = None¶
The key that references an environment spec in a job. This field is required for Python script, Python wheel and dbt tasks when using serverless compute.
- execution_duration: int | None = None¶
The time in milliseconds it took to execute the commands in the JAR or notebook until they completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The execution_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- existing_cluster_id: str | None = None¶
If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops responding. We suggest running jobs and tasks on new clusters for greater reliability
- for_each_task: RunForEachTask | None = None¶
The task executes a nested task for every input provided when the for_each_task field is present.
- gen_ai_compute_task: GenAiComputeTask | None = None¶
- git_source: GitSource | None = None¶
An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks. If git_source is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting source to WORKSPACE on the task. Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, git_source must be defined on the job.
- job_cluster_key: str | None = None¶
If job_cluster_key, this task is executed reusing the cluster specified in job.settings.job_clusters.
- libraries: List[Library] | None = None¶
An optional list of libraries to be installed on the cluster. The default value is an empty list.
- max_retries: int | None = None¶
An optional maximum number of times to retry an unsuccessful run. A run is considered to be unsuccessful if it completes with the FAILED result_state or INTERNAL_ERROR life_cycle_state. The value -1 means to retry indefinitely and the value 0 means to never retry.
- min_retry_interval_millis: int | None = None¶
An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried.
- new_cluster: ClusterSpec | None = None¶
If new_cluster, a description of a new cluster that is created for each run.
- notebook_task: NotebookTask | None = None¶
The task runs a notebook when the notebook_task field is present.
- notification_settings: TaskNotificationSettings | None = None¶
Optional notification settings that are used when sending notifications to each of the email_notifications and webhook_notifications for this task run.
- pipeline_task: PipelineTask | None = None¶
The task triggers a pipeline update when the pipeline_task field is present. Only pipelines configured to use triggered more are supported.
- power_bi_task: PowerBiTask | None = None¶
The task triggers a Power BI semantic model update when the power_bi_task field is present.
- python_operator_task: PythonOperatorTask | None = None¶
The task runs a Python operator task.
- python_wheel_task: PythonWheelTask | None = None¶
The task runs a Python wheel when the python_wheel_task field is present.
- queue_duration: int | None = None¶
The time in milliseconds that the run has spent in the queue.
- resolved_values: ResolvedValues | None = None¶
Parameter values including resolved references
- retry_on_timeout: bool | None = None¶
An optional policy to specify whether to retry a job when it times out. The default behavior is to not retry on timeout.
- run_duration: int | None = None¶
The time in milliseconds it took the job run and all of its repairs to finish.
- run_id: int | None = None¶
The ID of the task run.
- run_if: RunIf | None = None¶
An optional value indicating the condition that determines whether the task should be run once its dependencies have been completed. When omitted, defaults to ALL_SUCCESS. See :method:jobs/create for a list of possible values.
- run_job_task: RunJobTask | None = None¶
The task triggers another job when the run_job_task field is present.
- run_page_url: str | None = None¶
- setup_duration: int | None = None¶
The time in milliseconds it took to set up the cluster. For runs that run on new clusters this is the cluster creation time, for runs that run on existing clusters this time should be very short. The duration of a task run is the sum of the setup_duration, execution_duration, and the cleanup_duration. The setup_duration field is set to 0 for multitask job runs. The total duration of a multitask job run is the value of the run_duration field.
- spark_jar_task: SparkJarTask | None = None¶
The task runs a JAR when the spark_jar_task field is present.
- spark_python_task: SparkPythonTask | None = None¶
The task runs a Python file when the spark_python_task field is present.
- spark_submit_task: SparkSubmitTask | None = None¶
(Legacy) The task runs the spark-submit script when the spark_submit_task field is present. Databricks recommends using the spark_jar_task instead; see [Spark Submit task for jobs](/jobs/spark-submit).
- sql_task: SqlTask | None = None¶
The task runs a SQL query or file, or it refreshes a SQL alert or a legacy SQL dashboard when the sql_task field is present.
- start_time: int | None = None¶
The time at which this run was started in epoch milliseconds (milliseconds since 1/1/1970 UTC). This may not be the time when the job task starts executing, for example, if the job is scheduled to run on a new cluster, this is the time the cluster creation call is issued.
- timeout_seconds: int | None = None¶
An optional timeout applied to each run of this job task. A value of 0 means no timeout.
- webhook_notifications: WebhookNotifications | None = None¶
A collection of system notification IDs to notify when the run begins or completes. The default behavior is to not send any system notifications. Task webhooks respect the task notification settings.
- as_dict() dict¶
Serializes the RunTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the RunTask into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.RunType¶
The type of a run. * JOB_RUN: Normal job run. A run created with :method:jobs/runNow. * WORKFLOW_RUN: Workflow run. A run created with [dbutils.notebook.run]. * SUBMIT_RUN: Submit run. A run created with :method:jobs/submit. [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow
- JOB_RUN = "JOB_RUN"¶
- SUBMIT_RUN = "SUBMIT_RUN"¶
- WORKFLOW_RUN = "WORKFLOW_RUN"¶
- class databricks.sdk.service.jobs.Source¶
Optional location type of the SQL file. When set to WORKSPACE, the SQL file will be retrieved from the local Databricks workspace. When set to GIT, the SQL file will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise. * WORKSPACE: SQL file is located in Databricks workspace. * GIT: SQL file is located in cloud Git provider.
- GIT = "GIT"¶
- WORKSPACE = "WORKSPACE"¶
- class databricks.sdk.service.jobs.SparkJarTask(jar_uri: 'Optional[str]' = None, main_class_name: 'Optional[str]' = None, parameters: 'Optional[List[str]]' = None, run_as_repl: 'Optional[bool]' = None)¶
- jar_uri: str | None = None¶
Deprecated since 04/2016. For classic compute, provide a jar through the libraries field instead. For serverless compute, provide a jar though the java_dependencies field inside the environments list.
See the examples of classic and serverless compute usage at the top of the page.
- main_class_name: str | None = None¶
The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library.
The code must use SparkContext.getOrCreate to obtain a Spark context; otherwise, runs of the job fail.
- parameters: List[str] | None = None¶
Parameters passed to the main method.
Use [Task parameter variables] to set parameters containing information about job runs.
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
- run_as_repl: bool | None = None¶
Deprecated. A value of false is no longer supported.
- as_dict() dict¶
Serializes the SparkJarTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SparkJarTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SparkJarTask¶
Deserializes the SparkJarTask from a dictionary.
- class databricks.sdk.service.jobs.SparkPythonTask(python_file: 'str', parameters: 'Optional[List[str]]' = None, source: 'Optional[Source]' = None)¶
- python_file: str¶
The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For python files stored in the Databricks workspace, the path must be absolute and begin with /. For files stored in a remote repository, the path must be relative. This field is required.
- parameters: List[str] | None = None¶
Command line parameters passed to the Python file.
Use [Task parameter variables] to set parameters containing information about job runs.
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
- source: Source | None = None¶
Optional location type of the Python file. When set to WORKSPACE or not specified, the file will be retrieved from the local Databricks workspace or cloud location (if the python_file has a URI format). When set to GIT, the Python file will be retrieved from a Git repository defined in git_source.
WORKSPACE: The Python file is located in a Databricks workspace or at a cloud filesystem
URI. * GIT: The Python file is located in a remote Git repository.
- as_dict() dict¶
Serializes the SparkPythonTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SparkPythonTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SparkPythonTask¶
Deserializes the SparkPythonTask from a dictionary.
- class databricks.sdk.service.jobs.SparkSubmitTask(parameters: 'Optional[List[str]]' = None)¶
- parameters: List[str] | None = None¶
Command-line parameters passed to spark submit.
Use [Task parameter variables] to set parameters containing information about job runs.
[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
- as_dict() dict¶
Serializes the SparkSubmitTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SparkSubmitTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SparkSubmitTask¶
Deserializes the SparkSubmitTask from a dictionary.
- class databricks.sdk.service.jobs.SparseCheckout(patterns: 'Optional[List[str]]' = None)¶
- patterns: List[str] | None = None¶
List of patterns to include for sparse checkout.
- as_dict() dict¶
Serializes the SparseCheckout into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SparseCheckout into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SparseCheckout¶
Deserializes the SparseCheckout from a dictionary.
- class databricks.sdk.service.jobs.SqlAlertOutput(alert_state: 'Optional[SqlAlertState]' = None, output_link: 'Optional[str]' = None, query_text: 'Optional[str]' = None, sql_statements: 'Optional[List[SqlStatementOutput]]' = None, warehouse_id: 'Optional[str]' = None)¶
- alert_state: SqlAlertState | None = None¶
- output_link: str | None = None¶
The link to find the output results.
- query_text: str | None = None¶
The text of the SQL query. Can Run permission of the SQL query associated with the SQL alert is required to view this field.
- sql_statements: List[SqlStatementOutput] | None = None¶
Information about SQL statements executed in the run.
- warehouse_id: str | None = None¶
The canonical identifier of the SQL warehouse.
- as_dict() dict¶
Serializes the SqlAlertOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlAlertOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlAlertOutput¶
Deserializes the SqlAlertOutput from a dictionary.
- class databricks.sdk.service.jobs.SqlAlertState¶
The state of the SQL alert. * UNKNOWN: alert yet to be evaluated * OK: alert evaluated and did not fulfill trigger conditions * TRIGGERED: alert evaluated and fulfilled trigger conditions
- OK = "OK"¶
- TRIGGERED = "TRIGGERED"¶
- UNKNOWN = "UNKNOWN"¶
- class databricks.sdk.service.jobs.SqlDashboardOutput(warehouse_id: 'Optional[str]' = None, widgets: 'Optional[List[SqlDashboardWidgetOutput]]' = None)¶
- warehouse_id: str | None = None¶
The canonical identifier of the SQL warehouse.
- widgets: List[SqlDashboardWidgetOutput] | None = None¶
Widgets executed in the run. Only SQL query based widgets are listed.
- as_dict() dict¶
Serializes the SqlDashboardOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlDashboardOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlDashboardOutput¶
Deserializes the SqlDashboardOutput from a dictionary.
- class databricks.sdk.service.jobs.SqlDashboardWidgetOutput(end_time: 'Optional[int]' = None, error: 'Optional[SqlOutputError]' = None, output_link: 'Optional[str]' = None, start_time: 'Optional[int]' = None, status: 'Optional[SqlDashboardWidgetOutputStatus]' = None, widget_id: 'Optional[str]' = None, widget_title: 'Optional[str]' = None)¶
- end_time: int | None = None¶
Time (in epoch milliseconds) when execution of the SQL widget ends.
- error: SqlOutputError | None = None¶
The information about the error when execution fails.
- output_link: str | None = None¶
The link to find the output results.
- start_time: int | None = None¶
Time (in epoch milliseconds) when execution of the SQL widget starts.
- status: SqlDashboardWidgetOutputStatus | None = None¶
The execution status of the SQL widget.
- widget_id: str | None = None¶
The canonical identifier of the SQL widget.
- widget_title: str | None = None¶
The title of the SQL widget.
- as_dict() dict¶
Serializes the SqlDashboardWidgetOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlDashboardWidgetOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlDashboardWidgetOutput¶
Deserializes the SqlDashboardWidgetOutput from a dictionary.
- class databricks.sdk.service.jobs.SqlDashboardWidgetOutputStatus¶
- CANCELLED = "CANCELLED"¶
- FAILED = "FAILED"¶
- PENDING = "PENDING"¶
- RUNNING = "RUNNING"¶
- SUCCESS = "SUCCESS"¶
- class databricks.sdk.service.jobs.SqlOutput(alert_output: 'Optional[SqlAlertOutput]' = None, dashboard_output: 'Optional[SqlDashboardOutput]' = None, query_output: 'Optional[SqlQueryOutput]' = None)¶
- alert_output: SqlAlertOutput | None = None¶
The output of a SQL alert task, if available.
- dashboard_output: SqlDashboardOutput | None = None¶
The output of a SQL dashboard task, if available.
- query_output: SqlQueryOutput | None = None¶
The output of a SQL query task, if available.
- as_dict() dict¶
Serializes the SqlOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlOutput into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.SqlOutputError(message: 'Optional[str]' = None)¶
- message: str | None = None¶
The error message when execution fails.
- as_dict() dict¶
Serializes the SqlOutputError into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlOutputError into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlOutputError¶
Deserializes the SqlOutputError from a dictionary.
- class databricks.sdk.service.jobs.SqlQueryOutput(endpoint_id: 'Optional[str]' = None, output_link: 'Optional[str]' = None, query_text: 'Optional[str]' = None, sql_statements: 'Optional[List[SqlStatementOutput]]' = None, warehouse_id: 'Optional[str]' = None)¶
- endpoint_id: str | None = None¶
- output_link: str | None = None¶
The link to find the output results.
- query_text: str | None = None¶
The text of the SQL query. Can Run permission of the SQL query is required to view this field.
- sql_statements: List[SqlStatementOutput] | None = None¶
Information about SQL statements executed in the run.
- warehouse_id: str | None = None¶
The canonical identifier of the SQL warehouse.
- as_dict() dict¶
Serializes the SqlQueryOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlQueryOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlQueryOutput¶
Deserializes the SqlQueryOutput from a dictionary.
- class databricks.sdk.service.jobs.SqlStatementOutput(lookup_key: 'Optional[str]' = None)¶
- lookup_key: str | None = None¶
A key that can be used to look up query details.
- as_dict() dict¶
Serializes the SqlStatementOutput into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlStatementOutput into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlStatementOutput¶
Deserializes the SqlStatementOutput from a dictionary.
- class databricks.sdk.service.jobs.SqlTask(warehouse_id: 'str', alert: 'Optional[SqlTaskAlert]' = None, dashboard: 'Optional[SqlTaskDashboard]' = None, file: 'Optional[SqlTaskFile]' = None, parameters: 'Optional[Dict[str, str]]' = None, query: 'Optional[SqlTaskQuery]' = None)¶
- warehouse_id: str¶
The canonical identifier of the SQL warehouse. Recommended to use with serverless or pro SQL warehouses. Classic SQL warehouses are only supported for SQL alert, dashboard and query tasks and are limited to scheduled single-task jobs.
- alert: SqlTaskAlert | None = None¶
If alert, indicates that this job must refresh a SQL alert.
- dashboard: SqlTaskDashboard | None = None¶
If dashboard, indicates that this job must refresh a SQL dashboard.
- file: SqlTaskFile | None = None¶
If file, indicates that this job runs a SQL file in a remote Git repository.
- parameters: Dict[str, str] | None = None¶
Parameters to be used for each run of this job. The SQL alert task does not support custom parameters.
- query: SqlTaskQuery | None = None¶
If query, indicates that this job must execute a SQL query.
- as_dict() dict¶
Serializes the SqlTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTask into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.SqlTaskAlert(alert_id: 'str', pause_subscriptions: 'Optional[bool]' = None, subscriptions: 'Optional[List[SqlTaskSubscription]]' = None)¶
- alert_id: str¶
The canonical identifier of the SQL alert.
- pause_subscriptions: bool | None = None¶
If true, the alert notifications are not sent to subscribers.
- subscriptions: List[SqlTaskSubscription] | None = None¶
If specified, alert notifications are sent to subscribers.
- as_dict() dict¶
Serializes the SqlTaskAlert into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTaskAlert into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlTaskAlert¶
Deserializes the SqlTaskAlert from a dictionary.
- class databricks.sdk.service.jobs.SqlTaskDashboard(dashboard_id: 'str', custom_subject: 'Optional[str]' = None, pause_subscriptions: 'Optional[bool]' = None, subscriptions: 'Optional[List[SqlTaskSubscription]]' = None)¶
- dashboard_id: str¶
The canonical identifier of the SQL dashboard.
- custom_subject: str | None = None¶
Subject of the email sent to subscribers of this task.
- pause_subscriptions: bool | None = None¶
If true, the dashboard snapshot is not taken, and emails are not sent to subscribers.
- subscriptions: List[SqlTaskSubscription] | None = None¶
If specified, dashboard snapshots are sent to subscriptions.
- as_dict() dict¶
Serializes the SqlTaskDashboard into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTaskDashboard into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlTaskDashboard¶
Deserializes the SqlTaskDashboard from a dictionary.
- class databricks.sdk.service.jobs.SqlTaskFile(path: 'str', source: 'Optional[Source]' = None)¶
- path: str¶
Path of the SQL file. Must be relative if the source is a remote Git repository and absolute for workspace paths.
- source: Source | None = None¶
Optional location type of the SQL file. When set to WORKSPACE, the SQL file will be retrieved from the local Databricks workspace. When set to GIT, the SQL file will be retrieved from a Git repository defined in git_source. If the value is empty, the task will use GIT if git_source is defined and WORKSPACE otherwise.
WORKSPACE: SQL file is located in Databricks workspace. * GIT: SQL file is located in
cloud Git provider.
- as_dict() dict¶
Serializes the SqlTaskFile into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTaskFile into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlTaskFile¶
Deserializes the SqlTaskFile from a dictionary.
- class databricks.sdk.service.jobs.SqlTaskQuery(query_id: 'str')¶
- query_id: str¶
The canonical identifier of the SQL query.
- as_dict() dict¶
Serializes the SqlTaskQuery into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTaskQuery into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlTaskQuery¶
Deserializes the SqlTaskQuery from a dictionary.
- class databricks.sdk.service.jobs.SqlTaskSubscription(destination_id: 'Optional[str]' = None, user_name: 'Optional[str]' = None)¶
- destination_id: str | None = None¶
The canonical identifier of the destination to receive email notification. This parameter is mutually exclusive with user_name. You cannot set both destination_id and user_name for subscription notifications.
- user_name: str | None = None¶
The user name to receive the subscription email. This parameter is mutually exclusive with destination_id. You cannot set both destination_id and user_name for subscription notifications.
- as_dict() dict¶
Serializes the SqlTaskSubscription into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SqlTaskSubscription into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SqlTaskSubscription¶
Deserializes the SqlTaskSubscription from a dictionary.
- class databricks.sdk.service.jobs.StorageMode¶
- DIRECT_QUERY = "DIRECT_QUERY"¶
- DUAL = "DUAL"¶
- IMPORT = "IMPORT"¶
- class databricks.sdk.service.jobs.SubmitRunResponse(run_id: int | None = None)¶
Run was created and started successfully.
- run_id: int | None = None¶
The canonical identifier for the newly submitted run.
- as_dict() dict¶
Serializes the SubmitRunResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SubmitRunResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SubmitRunResponse¶
Deserializes the SubmitRunResponse from a dictionary.
- class databricks.sdk.service.jobs.SubmitTask(task_key: 'str', alert_task: 'Optional[AlertTask]' = None, clean_rooms_notebook_task: 'Optional[CleanRoomsNotebookTask]' = None, compute: 'Optional[Compute]' = None, condition_task: 'Optional[ConditionTask]' = None, dashboard_task: 'Optional[DashboardTask]' = None, dbt_cloud_task: 'Optional[DbtCloudTask]' = None, dbt_platform_task: 'Optional[DbtPlatformTask]' = None, dbt_task: 'Optional[DbtTask]' = None, depends_on: 'Optional[List[TaskDependency]]' = None, description: 'Optional[str]' = None, disable_auto_optimization: 'Optional[bool]' = None, disabled: 'Optional[bool]' = None, email_notifications: 'Optional[JobEmailNotifications]' = None, environment_key: 'Optional[str]' = None, existing_cluster_id: 'Optional[str]' = None, for_each_task: 'Optional[ForEachTask]' = None, gen_ai_compute_task: 'Optional[GenAiComputeTask]' = None, health: 'Optional[JobsHealthRules]' = None, libraries: 'Optional[List[compute.Library]]' = None, max_retries: 'Optional[int]' = None, min_retry_interval_millis: 'Optional[int]' = None, new_cluster: 'Optional[compute.ClusterSpec]' = None, notebook_task: 'Optional[NotebookTask]' = None, notification_settings: 'Optional[TaskNotificationSettings]' = None, pipeline_task: 'Optional[PipelineTask]' = None, power_bi_task: 'Optional[PowerBiTask]' = None, python_operator_task: 'Optional[PythonOperatorTask]' = None, python_wheel_task: 'Optional[PythonWheelTask]' = None, retry_on_timeout: 'Optional[bool]' = None, run_if: 'Optional[RunIf]' = None, run_job_task: 'Optional[RunJobTask]' = None, spark_jar_task: 'Optional[SparkJarTask]' = None, spark_python_task: 'Optional[SparkPythonTask]' = None, spark_submit_task: 'Optional[SparkSubmitTask]' = None, sql_task: 'Optional[SqlTask]' = None, timeout_seconds: 'Optional[int]' = None, webhook_notifications: 'Optional[WebhookNotifications]' = None)¶
- task_key: str¶
A unique name for the task. This field is used to refer to this task from other tasks. This field is required and must be unique within its parent job. On Update or Reset, this field is used to reference the tasks to be updated or reset.
- alert_task: AlertTask | None = None¶
The task evaluates a Databricks alert and sends notifications to subscribers when the alert_task field is present.
- clean_rooms_notebook_task: CleanRoomsNotebookTask | None = None¶
The task runs a [clean rooms] notebook when the clean_rooms_notebook_task field is present.
[clean rooms]: https://docs.databricks.com/clean-rooms/index.html
- condition_task: ConditionTask | None = None¶
The task evaluates a condition that can be used to control the execution of other tasks when the condition_task field is present. The condition task does not require a cluster to execute and does not support retries or notifications.
- dashboard_task: DashboardTask | None = None¶
The task refreshes a dashboard and sends a snapshot to subscribers.
- dbt_cloud_task: DbtCloudTask | None = None¶
Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task
- dbt_platform_task: DbtPlatformTask | None = None¶
- dbt_task: DbtTask | None = None¶
The task runs one or more dbt commands when the dbt_task field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse.
- depends_on: List[TaskDependency] | None = None¶
An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete successfully before executing this task. The key is task_key, and the value is the name assigned to the dependent task.
- description: str | None = None¶
An optional description for this task.
- disable_auto_optimization: bool | None = None¶
An option to disable auto optimization in serverless
- disabled: bool | None = None¶
An optional flag to disable the task. If set to true, the task will not run even if it is part of a job.
- email_notifications: JobEmailNotifications | None = None¶
An optional set of email addresses notified when the task run begins or completes. The default behavior is to not send any emails.
- environment_key: str | None = None¶
The key that references an environment spec in a job. This field is required for Python script, Python wheel and dbt tasks when using serverless compute.
- existing_cluster_id: str | None = None¶
If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops responding. We suggest running jobs and tasks on new clusters for greater reliability
- for_each_task: ForEachTask | None = None¶
The task executes a nested task for every input provided when the for_each_task field is present.
- gen_ai_compute_task: GenAiComputeTask | None = None¶
- health: JobsHealthRules | None = None¶
- libraries: List[Library] | None = None¶
An optional list of libraries to be installed on the cluster. The default value is an empty list.
- max_retries: int | None = None¶
An optional maximum number of times to retry an unsuccessful run. A run is considered to be unsuccessful if it completes with the FAILED result_state or INTERNAL_ERROR life_cycle_state. The value -1 means to retry indefinitely and the value 0 means to never retry.
- min_retry_interval_millis: int | None = None¶
An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried.
- new_cluster: ClusterSpec | None = None¶
If new_cluster, a description of a new cluster that is created for each run.
- notebook_task: NotebookTask | None = None¶
The task runs a notebook when the notebook_task field is present.
- notification_settings: TaskNotificationSettings | None = None¶
Optional notification settings that are used when sending notifications to each of the email_notifications and webhook_notifications for this task run.
- pipeline_task: PipelineTask | None = None¶
The task triggers a pipeline update when the pipeline_task field is present. Only pipelines configured to use triggered more are supported.
- power_bi_task: PowerBiTask | None = None¶
The task triggers a Power BI semantic model update when the power_bi_task field is present.
- python_operator_task: PythonOperatorTask | None = None¶
The task runs a Python operator task.
- python_wheel_task: PythonWheelTask | None = None¶
The task runs a Python wheel when the python_wheel_task field is present.
- retry_on_timeout: bool | None = None¶
An optional policy to specify whether to retry a job when it times out. The default behavior is to not retry on timeout.
- run_if: RunIf | None = None¶
An optional value indicating the condition that determines whether the task should be run once its dependencies have been completed. When omitted, defaults to ALL_SUCCESS. See :method:jobs/create for a list of possible values.
- run_job_task: RunJobTask | None = None¶
The task triggers another job when the run_job_task field is present.
- spark_jar_task: SparkJarTask | None = None¶
The task runs a JAR when the spark_jar_task field is present.
- spark_python_task: SparkPythonTask | None = None¶
The task runs a Python file when the spark_python_task field is present.
- spark_submit_task: SparkSubmitTask | None = None¶
(Legacy) The task runs the spark-submit script when the spark_submit_task field is present. Databricks recommends using the spark_jar_task instead; see [Spark Submit task for jobs](/jobs/spark-submit).
- sql_task: SqlTask | None = None¶
The task runs a SQL query or file, or it refreshes a SQL alert or a legacy SQL dashboard when the sql_task field is present.
- timeout_seconds: int | None = None¶
An optional timeout applied to each run of this job task. A value of 0 means no timeout.
- webhook_notifications: WebhookNotifications | None = None¶
A collection of system notification IDs to notify when the run begins or completes. The default behavior is to not send any system notifications. Task webhooks respect the task notification settings.
- as_dict() dict¶
Serializes the SubmitTask into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SubmitTask into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SubmitTask¶
Deserializes the SubmitTask from a dictionary.
- class databricks.sdk.service.jobs.Subscription(custom_subject: 'Optional[str]' = None, paused: 'Optional[bool]' = None, subscribers: 'Optional[List[SubscriptionSubscriber]]' = None)¶
- custom_subject: str | None = None¶
Optional: Allows users to specify a custom subject line on the email sent to subscribers.
- paused: bool | None = None¶
When true, the subscription will not send emails.
- subscribers: List[SubscriptionSubscriber] | None = None¶
The list of subscribers to send the snapshot of the dashboard to.
- as_dict() dict¶
Serializes the Subscription into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Subscription into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) Subscription¶
Deserializes the Subscription from a dictionary.
- class databricks.sdk.service.jobs.SubscriptionSubscriber(destination_id: 'Optional[str]' = None, user_name: 'Optional[str]' = None)¶
- destination_id: str | None = None¶
A snapshot of the dashboard will be sent to the destination when the destination_id field is present.
- user_name: str | None = None¶
A snapshot of the dashboard will be sent to the user’s email when the user_name field is present.
- as_dict() dict¶
Serializes the SubscriptionSubscriber into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the SubscriptionSubscriber into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) SubscriptionSubscriber¶
Deserializes the SubscriptionSubscriber from a dictionary.
- class databricks.sdk.service.jobs.TableState(has_seen_updates: 'Optional[bool]' = None, table_name: 'Optional[str]' = None)¶
- has_seen_updates: bool | None = None¶
Whether or not the table has seen updates since either the creation of the trigger or the last successful evaluation of the trigger
- table_name: str | None = None¶
Full table name of the table to monitor, e.g. mycatalog.myschema.mytable
- as_dict() dict¶
Serializes the TableState into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TableState into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TableState¶
Deserializes the TableState from a dictionary.
- class databricks.sdk.service.jobs.TableTriggerState(last_seen_table_states: 'Optional[List[TableState]]' = None, using_scalable_monitoring: 'Optional[bool]' = None)¶
- last_seen_table_states: List[TableState] | None = None¶
- using_scalable_monitoring: bool | None = None¶
Indicates whether the trigger is using scalable monitoring.
- as_dict() dict¶
Serializes the TableTriggerState into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TableTriggerState into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TableTriggerState¶
Deserializes the TableTriggerState from a dictionary.
- class databricks.sdk.service.jobs.TableUpdateTriggerConfiguration(table_names: 'List[str]', condition: 'Optional[Condition]' = None, min_time_between_triggers_seconds: 'Optional[int]' = None, wait_after_last_change_seconds: 'Optional[int]' = None)¶
- table_names: List[str]¶
A list of tables to monitor for changes. The table name must be in the format catalog_name.schema_name.table_name.
- min_time_between_triggers_seconds: int | None = None¶
If set, the trigger starts a run only after the specified amount of time has passed since the last time the trigger fired. The minimum allowed value is 60 seconds.
- wait_after_last_change_seconds: int | None = None¶
If set, the trigger starts a run only after no table updates have occurred for the specified time and can be used to wait for a series of table updates before triggering a run. The minimum allowed value is 60 seconds.
- as_dict() dict¶
Serializes the TableUpdateTriggerConfiguration into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TableUpdateTriggerConfiguration into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TableUpdateTriggerConfiguration¶
Deserializes the TableUpdateTriggerConfiguration from a dictionary.
- class databricks.sdk.service.jobs.Task(task_key: 'str', alert_task: 'Optional[AlertTask]' = None, clean_rooms_notebook_task: 'Optional[CleanRoomsNotebookTask]' = None, compute: 'Optional[Compute]' = None, condition_task: 'Optional[ConditionTask]' = None, dashboard_task: 'Optional[DashboardTask]' = None, dbt_cloud_task: 'Optional[DbtCloudTask]' = None, dbt_platform_task: 'Optional[DbtPlatformTask]' = None, dbt_task: 'Optional[DbtTask]' = None, depends_on: 'Optional[List[TaskDependency]]' = None, description: 'Optional[str]' = None, disable_auto_optimization: 'Optional[bool]' = None, disabled: 'Optional[bool]' = None, email_notifications: 'Optional[TaskEmailNotifications]' = None, environment_key: 'Optional[str]' = None, existing_cluster_id: 'Optional[str]' = None, for_each_task: 'Optional[ForEachTask]' = None, gen_ai_compute_task: 'Optional[GenAiComputeTask]' = None, health: 'Optional[JobsHealthRules]' = None, job_cluster_key: 'Optional[str]' = None, libraries: 'Optional[List[compute.Library]]' = None, max_retries: 'Optional[int]' = None, min_retry_interval_millis: 'Optional[int]' = None, new_cluster: 'Optional[compute.ClusterSpec]' = None, notebook_task: 'Optional[NotebookTask]' = None, notification_settings: 'Optional[TaskNotificationSettings]' = None, pipeline_task: 'Optional[PipelineTask]' = None, power_bi_task: 'Optional[PowerBiTask]' = None, python_operator_task: 'Optional[PythonOperatorTask]' = None, python_wheel_task: 'Optional[PythonWheelTask]' = None, retry_on_timeout: 'Optional[bool]' = None, run_if: 'Optional[RunIf]' = None, run_job_task: 'Optional[RunJobTask]' = None, spark_jar_task: 'Optional[SparkJarTask]' = None, spark_python_task: 'Optional[SparkPythonTask]' = None, spark_submit_task: 'Optional[SparkSubmitTask]' = None, sql_task: 'Optional[SqlTask]' = None, timeout_seconds: 'Optional[int]' = None, webhook_notifications: 'Optional[WebhookNotifications]' = None)¶
- task_key: str¶
A unique name for the task. This field is used to refer to this task from other tasks. This field is required and must be unique within its parent job. On Update or Reset, this field is used to reference the tasks to be updated or reset.
- alert_task: AlertTask | None = None¶
The task evaluates a Databricks alert and sends notifications to subscribers when the alert_task field is present.
- clean_rooms_notebook_task: CleanRoomsNotebookTask | None = None¶
The task runs a [clean rooms] notebook when the clean_rooms_notebook_task field is present.
[clean rooms]: https://docs.databricks.com/clean-rooms/index.html
- condition_task: ConditionTask | None = None¶
The task evaluates a condition that can be used to control the execution of other tasks when the condition_task field is present. The condition task does not require a cluster to execute and does not support retries or notifications.
- dashboard_task: DashboardTask | None = None¶
The task refreshes a dashboard and sends a snapshot to subscribers.
- dbt_cloud_task: DbtCloudTask | None = None¶
Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task
- dbt_platform_task: DbtPlatformTask | None = None¶
- dbt_task: DbtTask | None = None¶
The task runs one or more dbt commands when the dbt_task field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse.
- depends_on: List[TaskDependency] | None = None¶
An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete before executing this task. The task will run only if the run_if condition is true. The key is task_key, and the value is the name assigned to the dependent task.
- description: str | None = None¶
An optional description for this task.
- disable_auto_optimization: bool | None = None¶
An option to disable auto optimization in serverless
- disabled: bool | None = None¶
An optional flag to disable the task. If set to true, the task will not run even if it is part of a job.
- email_notifications: TaskEmailNotifications | None = None¶
An optional set of email addresses that is notified when runs of this task begin or complete as well as when this task is deleted. The default behavior is to not send any emails.
- environment_key: str | None = None¶
The key that references an environment spec in a job. This field is required for Python script, Python wheel and dbt tasks when using serverless compute.
- existing_cluster_id: str | None = None¶
If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops responding. We suggest running jobs and tasks on new clusters for greater reliability
- for_each_task: ForEachTask | None = None¶
The task executes a nested task for every input provided when the for_each_task field is present.
- gen_ai_compute_task: GenAiComputeTask | None = None¶
- health: JobsHealthRules | None = None¶
- job_cluster_key: str | None = None¶
If job_cluster_key, this task is executed reusing the cluster specified in job.settings.job_clusters.
- libraries: List[Library] | None = None¶
An optional list of libraries to be installed on the cluster. The default value is an empty list.
- max_retries: int | None = None¶
An optional maximum number of times to retry an unsuccessful run. A run is considered to be unsuccessful if it completes with the FAILED result_state or INTERNAL_ERROR life_cycle_state. The value -1 means to retry indefinitely and the value 0 means to never retry.
- min_retry_interval_millis: int | None = None¶
An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried.
- new_cluster: ClusterSpec | None = None¶
If new_cluster, a description of a new cluster that is created for each run.
- notebook_task: NotebookTask | None = None¶
The task runs a notebook when the notebook_task field is present.
- notification_settings: TaskNotificationSettings | None = None¶
Optional notification settings that are used when sending notifications to each of the email_notifications and webhook_notifications for this task.
- pipeline_task: PipelineTask | None = None¶
The task triggers a pipeline update when the pipeline_task field is present. Only pipelines configured to use triggered more are supported.
- power_bi_task: PowerBiTask | None = None¶
The task triggers a Power BI semantic model update when the power_bi_task field is present.
- python_operator_task: PythonOperatorTask | None = None¶
The task runs a Python operator task.
- python_wheel_task: PythonWheelTask | None = None¶
The task runs a Python wheel when the python_wheel_task field is present.
- retry_on_timeout: bool | None = None¶
An optional policy to specify whether to retry a job when it times out. The default behavior is to not retry on timeout.
- run_if: RunIf | None = None¶
An optional value specifying the condition determining whether the task is run once its dependencies have been completed.
ALL_SUCCESS: All dependencies have executed and succeeded * AT_LEAST_ONE_SUCCESS: At least
one dependency has succeeded * NONE_FAILED: None of the dependencies have failed and at least one was executed * ALL_DONE: All dependencies have been completed * AT_LEAST_ONE_FAILED: At least one dependency failed * ALL_FAILED: ALl dependencies have failed
- run_job_task: RunJobTask | None = None¶
The task triggers another job when the run_job_task field is present.
- spark_jar_task: SparkJarTask | None = None¶
The task runs a JAR when the spark_jar_task field is present.
- spark_python_task: SparkPythonTask | None = None¶
The task runs a Python file when the spark_python_task field is present.
- spark_submit_task: SparkSubmitTask | None = None¶
(Legacy) The task runs the spark-submit script when the spark_submit_task field is present. Databricks recommends using the spark_jar_task instead; see [Spark Submit task for jobs](/jobs/spark-submit).
- sql_task: SqlTask | None = None¶
The task runs a SQL query or file, or it refreshes a SQL alert or a legacy SQL dashboard when the sql_task field is present.
- timeout_seconds: int | None = None¶
An optional timeout applied to each run of this job task. A value of 0 means no timeout.
- webhook_notifications: WebhookNotifications | None = None¶
A collection of system notification IDs to notify when runs of this task begin or complete. The default behavior is to not send any system notifications.
- as_dict() dict¶
Serializes the Task into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Task into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.TaskDependency(task_key: 'str', outcome: 'Optional[str]' = None)¶
- task_key: str¶
The name of the task this task depends on.
- outcome: str | None = None¶
Can only be specified on condition task dependencies. The outcome of the dependent task that must be met for this task to run.
- as_dict() dict¶
Serializes the TaskDependency into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TaskDependency into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TaskDependency¶
Deserializes the TaskDependency from a dictionary.
- class databricks.sdk.service.jobs.TaskEmailNotifications(no_alert_for_skipped_runs: 'Optional[bool]' = None, on_duration_warning_threshold_exceeded: 'Optional[List[str]]' = None, on_failure: 'Optional[List[str]]' = None, on_start: 'Optional[List[str]]' = None, on_streaming_backlog_exceeded: 'Optional[List[str]]' = None, on_success: 'Optional[List[str]]' = None)¶
- no_alert_for_skipped_runs: bool | None = None¶
If true, do not send email to recipients specified in on_failure if the run is skipped. This field is deprecated. Please use the notification_settings.no_alert_for_skipped_runs field.
- on_duration_warning_threshold_exceeded: List[str] | None = None¶
A list of email addresses to be notified when the duration of a run exceeds the threshold specified for the RUN_DURATION_SECONDS metric in the health field. If no rule for the RUN_DURATION_SECONDS metric is specified in the health field for the job, notifications are not sent.
- on_failure: List[str] | None = None¶
A list of email addresses to be notified when a run unsuccessfully completes. A run is considered to have completed unsuccessfully if it ends with an INTERNAL_ERROR life_cycle_state or a FAILED, or TIMED_OUT result_state. If this is not specified on job creation, reset, or update the list is empty, and notifications are not sent.
- on_start: List[str] | None = None¶
A list of email addresses to be notified when a run begins. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent.
- on_streaming_backlog_exceeded: List[str] | None = None¶
A list of email addresses to notify when any streaming backlog thresholds are exceeded for any stream. Streaming backlog thresholds can be set in the health field using the following metrics: STREAMING_BACKLOG_BYTES, STREAMING_BACKLOG_RECORDS, STREAMING_BACKLOG_SECONDS, or STREAMING_BACKLOG_FILES. Alerting is based on the 10-minute average of these metrics. If the issue persists, notifications are resent every 30 minutes.
- on_success: List[str] | None = None¶
A list of email addresses to be notified when a run successfully completes. A run is considered to have completed successfully if it ends with a TERMINATED life_cycle_state and a SUCCESS result_state. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent.
- as_dict() dict¶
Serializes the TaskEmailNotifications into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TaskEmailNotifications into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TaskEmailNotifications¶
Deserializes the TaskEmailNotifications from a dictionary.
- class databricks.sdk.service.jobs.TaskNotificationSettings(alert_on_last_attempt: 'Optional[bool]' = None, no_alert_for_canceled_runs: 'Optional[bool]' = None, no_alert_for_skipped_runs: 'Optional[bool]' = None)¶
- alert_on_last_attempt: bool | None = None¶
If true, do not send notifications to recipients specified in on_start for the retried runs and do not send notifications to recipients specified in on_failure until the last retry of the run.
- no_alert_for_canceled_runs: bool | None = None¶
If true, do not send notifications to recipients specified in on_failure if the run is canceled.
- no_alert_for_skipped_runs: bool | None = None¶
If true, do not send notifications to recipients specified in on_failure if the run is skipped.
- as_dict() dict¶
Serializes the TaskNotificationSettings into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TaskNotificationSettings into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TaskNotificationSettings¶
Deserializes the TaskNotificationSettings from a dictionary.
- class databricks.sdk.service.jobs.TaskRetryMode¶
task retry mode of the continuous job * NEVER: The failed task will not be retried. * ON_FAILURE: Retry a failed task if at least one other task in the job is still running its first attempt. When this condition is no longer met or the retry limit is reached, the job run is cancelled and a new run is started.
- NEVER = "NEVER"¶
- ON_FAILURE = "ON_FAILURE"¶
- class databricks.sdk.service.jobs.TerminationCodeCode¶
The code indicates why the run was terminated. Additional codes might be introduced in future releases. * SUCCESS: The run was completed successfully. * SUCCESS_WITH_FAILURES: The run was completed successfully but some child runs failed. * USER_CANCELED: The run was successfully canceled during execution by a user. * CANCELED: The run was canceled during execution by the Databricks platform; for example, if the maximum run duration was exceeded. * SKIPPED: Run was never executed, for example, if the upstream task run failed, the dependency type condition was not met, or there were no material tasks to execute. * INTERNAL_ERROR: The run encountered an unexpected error. Refer to the state message for further details. * DRIVER_ERROR: The run encountered an error while communicating with the Spark Driver. * CLUSTER_ERROR: The run failed due to a cluster error. Refer to the state message for further details. * REPOSITORY_CHECKOUT_FAILED: Failed to complete the checkout due to an error when communicating with the third party service. * INVALID_CLUSTER_REQUEST: The run failed because it issued an invalid request to start the cluster. * WORKSPACE_RUN_LIMIT_EXCEEDED: The workspace has reached the quota for the maximum number of concurrent active runs. Consider scheduling the runs over a larger time frame. * FEATURE_DISABLED: The run failed because it tried to access a feature unavailable for the workspace. * CLUSTER_REQUEST_LIMIT_EXCEEDED: The number of cluster creation, start, and upsize requests have exceeded the allotted rate limit. Consider spreading the run execution over a larger time frame. * STORAGE_ACCESS_ERROR: The run failed due to an error when accessing the customer blob storage. Refer to the state message for further details. * RUN_EXECUTION_ERROR: The run was completed with task failures. For more details, refer to the state message or run output. * UNAUTHORIZED_ERROR: The run failed due to a permission issue while accessing a resource. Refer to the state message for further details. * LIBRARY_INSTALLATION_ERROR: The run failed while installing the user-requested library. Refer to the state message for further details. The causes might include, but are not limited to: The provided library is invalid, there are insufficient permissions to install the library, and so forth. * MAX_CONCURRENT_RUNS_EXCEEDED: The scheduled run exceeds the limit of maximum concurrent runs set for the job. * MAX_SPARK_CONTEXTS_EXCEEDED: The run is scheduled on a cluster that has already reached the maximum number of contexts it is configured to create. See: [Link]. * RESOURCE_NOT_FOUND: A resource necessary for run execution does not exist. Refer to the state message for further details. * INVALID_RUN_CONFIGURATION: The run failed due to an invalid configuration. Refer to the state message for further details. * CLOUD_FAILURE: The run failed due to a cloud provider issue. Refer to the state message for further details. * MAX_JOB_QUEUE_SIZE_EXCEEDED: The run was skipped due to reaching the job level queue size limit. * DISABLED: The run was never executed because it was disabled explicitly by the user. * BREAKING_CHANGE: Run failed because of an intentional breaking change in Spark, but it will be retried with a mitigation config. * CLUSTER_TERMINATED_BY_USER: The run failed because the externally managed cluster entered an unusable state, likely due to the user terminating or restarting it outside the jobs service. [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now
- BREAKING_CHANGE = "BREAKING_CHANGE"¶
- BUDGET_POLICY_LIMIT_EXCEEDED = "BUDGET_POLICY_LIMIT_EXCEEDED"¶
- CANCELED = "CANCELED"¶
- CLOUD_FAILURE = "CLOUD_FAILURE"¶
- CLUSTER_ERROR = "CLUSTER_ERROR"¶
- CLUSTER_REQUEST_LIMIT_EXCEEDED = "CLUSTER_REQUEST_LIMIT_EXCEEDED"¶
- DISABLED = "DISABLED"¶
- DRIVER_ERROR = "DRIVER_ERROR"¶
- FEATURE_DISABLED = "FEATURE_DISABLED"¶
- INTERNAL_ERROR = "INTERNAL_ERROR"¶
- INVALID_CLUSTER_REQUEST = "INVALID_CLUSTER_REQUEST"¶
- INVALID_RUN_CONFIGURATION = "INVALID_RUN_CONFIGURATION"¶
- LIBRARY_INSTALLATION_ERROR = "LIBRARY_INSTALLATION_ERROR"¶
- MAX_CONCURRENT_RUNS_EXCEEDED = "MAX_CONCURRENT_RUNS_EXCEEDED"¶
- MAX_JOB_QUEUE_SIZE_EXCEEDED = "MAX_JOB_QUEUE_SIZE_EXCEEDED"¶
- MAX_SPARK_CONTEXTS_EXCEEDED = "MAX_SPARK_CONTEXTS_EXCEEDED"¶
- REPOSITORY_CHECKOUT_FAILED = "REPOSITORY_CHECKOUT_FAILED"¶
- RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND"¶
- RUN_EXECUTION_ERROR = "RUN_EXECUTION_ERROR"¶
- SKIPPED = "SKIPPED"¶
- STORAGE_ACCESS_ERROR = "STORAGE_ACCESS_ERROR"¶
- SUCCESS = "SUCCESS"¶
- SUCCESS_WITH_FAILURES = "SUCCESS_WITH_FAILURES"¶
- UNAUTHORIZED_ERROR = "UNAUTHORIZED_ERROR"¶
- USER_CANCELED = "USER_CANCELED"¶
- WORKSPACE_RUN_LIMIT_EXCEEDED = "WORKSPACE_RUN_LIMIT_EXCEEDED"¶
- class databricks.sdk.service.jobs.TerminationDetails(code: 'Optional[TerminationCodeCode]' = None, message: 'Optional[str]' = None, type: 'Optional[TerminationTypeType]' = None)¶
- code: TerminationCodeCode | None = None¶
- message: str | None = None¶
A descriptive message with the termination details. This field is unstructured and the format might change.
- type: TerminationTypeType | None = None¶
- as_dict() dict¶
Serializes the TerminationDetails into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TerminationDetails into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TerminationDetails¶
Deserializes the TerminationDetails from a dictionary.
- class databricks.sdk.service.jobs.TerminationTypeType¶
SUCCESS: The run terminated without any issues * INTERNAL_ERROR: An error occurred in the Databricks platform. Please look at the [status page] or contact support if the issue persists. * CLIENT_ERROR: The run was terminated because of an error caused by user input or the job configuration. * CLOUD_FAILURE: The run was terminated because of an issue with your cloud provider.
[status page]: https://status.databricks.com/
- CLIENT_ERROR = "CLIENT_ERROR"¶
- CLOUD_FAILURE = "CLOUD_FAILURE"¶
- INTERNAL_ERROR = "INTERNAL_ERROR"¶
- SUCCESS = "SUCCESS"¶
- class databricks.sdk.service.jobs.TriggerInfo(run_id: int | None = None)¶
Additional details about what triggered the run
- run_id: int | None = None¶
The run id of the Run Job task run
- as_dict() dict¶
Serializes the TriggerInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TriggerInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TriggerInfo¶
Deserializes the TriggerInfo from a dictionary.
- class databricks.sdk.service.jobs.TriggerSettings(file_arrival: 'Optional[FileArrivalTriggerConfiguration]' = None, model: 'Optional[ModelTriggerConfiguration]' = None, pause_status: 'Optional[PauseStatus]' = None, periodic: 'Optional[PeriodicTriggerConfiguration]' = None, table_update: 'Optional[TableUpdateTriggerConfiguration]' = None)¶
- file_arrival: FileArrivalTriggerConfiguration | None = None¶
File arrival trigger settings.
- model: ModelTriggerConfiguration | None = None¶
- pause_status: PauseStatus | None = None¶
Whether this trigger is paused or not.
- periodic: PeriodicTriggerConfiguration | None = None¶
Periodic trigger settings.
- table_update: TableUpdateTriggerConfiguration | None = None¶
- as_dict() dict¶
Serializes the TriggerSettings into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TriggerSettings into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TriggerSettings¶
Deserializes the TriggerSettings from a dictionary.
- class databricks.sdk.service.jobs.TriggerStateProto(file_arrival: 'Optional[FileArrivalTriggerState]' = None, table: 'Optional[TableTriggerState]' = None)¶
- file_arrival: FileArrivalTriggerState | None = None¶
- table: TableTriggerState | None = None¶
- as_dict() dict¶
Serializes the TriggerStateProto into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the TriggerStateProto into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) TriggerStateProto¶
Deserializes the TriggerStateProto from a dictionary.
- class databricks.sdk.service.jobs.TriggerType¶
The type of trigger that fired this run. * PERIODIC: Schedules that periodically trigger runs, such as a cron scheduler. * ONE_TIME: One time triggers that fire a single run. This occurs you triggered a single run on demand through the UI or the API. * RETRY: Indicates a run that is triggered as a retry of a previously failed run. This occurs when you request to re-run the job in case of failures. * RUN_JOB_TASK: Indicates a run that is triggered using a Run Job task. * FILE_ARRIVAL: Indicates a run that is triggered by a file arrival. * CONTINUOUS: Indicates a run that is triggered by a continuous job. * TABLE: Indicates a run that is triggered by a table update. * CONTINUOUS_RESTART: Indicates a run created by user to manually restart a continuous job run. * MODEL: Indicates a run that is triggered by a model update.
- CONTINUOUS = "CONTINUOUS"¶
- CONTINUOUS_RESTART = "CONTINUOUS_RESTART"¶
- FILE_ARRIVAL = "FILE_ARRIVAL"¶
- ONE_TIME = "ONE_TIME"¶
- PERIODIC = "PERIODIC"¶
- RETRY = "RETRY"¶
- RUN_JOB_TASK = "RUN_JOB_TASK"¶
- TABLE = "TABLE"¶
- class databricks.sdk.service.jobs.ViewItem(content: 'Optional[str]' = None, name: 'Optional[str]' = None, type: 'Optional[ViewType]' = None)¶
- content: str | None = None¶
Content of the view.
- name: str | None = None¶
Name of the view item. In the case of code view, it would be the notebook’s name. In the case of dashboard view, it would be the dashboard’s name.
- as_dict() dict¶
Serializes the ViewItem into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ViewItem into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.ViewType¶
NOTEBOOK: Notebook view item. * DASHBOARD: Dashboard view item.
- DASHBOARD = "DASHBOARD"¶
- NOTEBOOK = "NOTEBOOK"¶
- class databricks.sdk.service.jobs.ViewsToExport¶
CODE: Code view of the notebook. * DASHBOARDS: All dashboard views of the notebook. * ALL: All views of the notebook.
- ALL = "ALL"¶
- CODE = "CODE"¶
- DASHBOARDS = "DASHBOARDS"¶
- class databricks.sdk.service.jobs.Webhook(id: 'str')¶
- id: str¶
- as_dict() dict¶
Serializes the Webhook into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Webhook into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.jobs.WebhookNotifications(on_duration_warning_threshold_exceeded: 'Optional[List[Webhook]]' = None, on_failure: 'Optional[List[Webhook]]' = None, on_start: 'Optional[List[Webhook]]' = None, on_streaming_backlog_exceeded: 'Optional[List[Webhook]]' = None, on_success: 'Optional[List[Webhook]]' = None)¶
- on_duration_warning_threshold_exceeded: List[Webhook] | None = None¶
An optional list of system notification IDs to call when the duration of a run exceeds the threshold specified for the RUN_DURATION_SECONDS metric in the health field. A maximum of 3 destinations can be specified for the on_duration_warning_threshold_exceeded property.
- on_failure: List[Webhook] | None = None¶
An optional list of system notification IDs to call when the run fails. A maximum of 3 destinations can be specified for the on_failure property.
- on_start: List[Webhook] | None = None¶
An optional list of system notification IDs to call when the run starts. A maximum of 3 destinations can be specified for the on_start property.
- on_streaming_backlog_exceeded: List[Webhook] | None = None¶
An optional list of system notification IDs to call when any streaming backlog thresholds are exceeded for any stream. Streaming backlog thresholds can be set in the health field using the following metrics: STREAMING_BACKLOG_BYTES, STREAMING_BACKLOG_RECORDS, STREAMING_BACKLOG_SECONDS, or STREAMING_BACKLOG_FILES. Alerting is based on the 10-minute average of these metrics. If the issue persists, notifications are resent every 30 minutes. A maximum of 3 destinations can be specified for the on_streaming_backlog_exceeded property.
- on_success: List[Webhook] | None = None¶
An optional list of system notification IDs to call when the run completes successfully. A maximum of 3 destinations can be specified for the on_success property.
- as_dict() dict¶
Serializes the WebhookNotifications into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WebhookNotifications into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WebhookNotifications¶
Deserializes the WebhookNotifications from a dictionary.
- class databricks.sdk.service.jobs.WidgetErrorDetail(message: 'Optional[str]' = None)¶
- message: str | None = None¶
- as_dict() dict¶
Serializes the WidgetErrorDetail into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WidgetErrorDetail into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WidgetErrorDetail¶
Deserializes the WidgetErrorDetail from a dictionary.