databricks-sdk 0.23.0__py3-none-any.whl → 0.24.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

@@ -80,6 +80,9 @@ class BaseRun:
80
80
  """The creator user name. This field won’t be included in the response if the user has already
81
81
  been deleted."""
82
82
 
83
+ description: Optional[str] = None
84
+ """Description of the run"""
85
+
83
86
  end_time: Optional[int] = None
84
87
  """The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
85
88
  field is set to 0 if the job is still running."""
@@ -122,6 +125,12 @@ class BaseRun:
122
125
  overriding_parameters: Optional[RunParameters] = None
123
126
  """The parameters used for this run."""
124
127
 
128
+ queue_duration: Optional[int] = None
129
+ """The time in milliseconds that the run has spent in the queue."""
130
+
131
+ repair_history: Optional[List[RepairHistoryItem]] = None
132
+ """The repair history of the run."""
133
+
125
134
  run_duration: Optional[int] = None
126
135
  """The time in milliseconds it took the job run and all of its repairs to finish."""
127
136
 
@@ -135,9 +144,9 @@ class BaseRun:
135
144
  """The URL to the detail page of the run."""
136
145
 
137
146
  run_type: Optional[RunType] = None
138
- """* `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow
139
- run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with
140
- :method:jobs/submit.
147
+ """The type of a run. * `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. *
148
+ `WORKFLOW_RUN`: Workflow run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit
149
+ run. A run created with :method:jobs/submit.
141
150
 
142
151
  [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow"""
143
152
 
@@ -175,6 +184,7 @@ class BaseRun:
175
184
  triggered by a table update."""
176
185
 
177
186
  trigger_info: Optional[TriggerInfo] = None
187
+ """Additional details about what triggered the run"""
178
188
 
179
189
  def as_dict(self) -> dict:
180
190
  """Serializes the BaseRun into a dictionary suitable for use as a JSON request body."""
@@ -184,6 +194,7 @@ class BaseRun:
184
194
  if self.cluster_instance: body['cluster_instance'] = self.cluster_instance.as_dict()
185
195
  if self.cluster_spec: body['cluster_spec'] = self.cluster_spec.as_dict()
186
196
  if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
197
+ if self.description is not None: body['description'] = self.description
187
198
  if self.end_time is not None: body['end_time'] = self.end_time
188
199
  if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
189
200
  if self.git_source: body['git_source'] = self.git_source.as_dict()
@@ -194,6 +205,8 @@ class BaseRun:
194
205
  if self.original_attempt_run_id is not None:
195
206
  body['original_attempt_run_id'] = self.original_attempt_run_id
196
207
  if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters.as_dict()
208
+ if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
209
+ if self.repair_history: body['repair_history'] = [v.as_dict() for v in self.repair_history]
197
210
  if self.run_duration is not None: body['run_duration'] = self.run_duration
198
211
  if self.run_id is not None: body['run_id'] = self.run_id
199
212
  if self.run_name is not None: body['run_name'] = self.run_name
@@ -216,6 +229,7 @@ class BaseRun:
216
229
  cluster_instance=_from_dict(d, 'cluster_instance', ClusterInstance),
217
230
  cluster_spec=_from_dict(d, 'cluster_spec', ClusterSpec),
218
231
  creator_user_name=d.get('creator_user_name', None),
232
+ description=d.get('description', None),
219
233
  end_time=d.get('end_time', None),
220
234
  execution_duration=d.get('execution_duration', None),
221
235
  git_source=_from_dict(d, 'git_source', GitSource),
@@ -225,6 +239,8 @@ class BaseRun:
225
239
  number_in_job=d.get('number_in_job', None),
226
240
  original_attempt_run_id=d.get('original_attempt_run_id', None),
227
241
  overriding_parameters=_from_dict(d, 'overriding_parameters', RunParameters),
242
+ queue_duration=d.get('queue_duration', None),
243
+ repair_history=_repeated_dict(d, 'repair_history', RepairHistoryItem),
228
244
  run_duration=d.get('run_duration', None),
229
245
  run_id=d.get('run_id', None),
230
246
  run_name=d.get('run_name', None),
@@ -340,22 +356,32 @@ class ClusterInstance:
340
356
 
341
357
  @dataclass
342
358
  class ClusterSpec:
359
+ compute_key: Optional[str] = None
360
+ """The key of the compute requirement, specified in `job.settings.compute`, to use for execution of
361
+ this task."""
362
+
343
363
  existing_cluster_id: Optional[str] = None
344
- """If existing_cluster_id, the ID of an existing cluster that is used for all runs of this job.
345
- When running jobs on an existing cluster, you may need to manually restart the cluster if it
346
- stops responding. We suggest running jobs on new clusters for greater reliability"""
364
+ """If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running
365
+ jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops
366
+ responding. We suggest running jobs and tasks on new clusters for greater reliability"""
367
+
368
+ job_cluster_key: Optional[str] = None
369
+ """If job_cluster_key, this task is executed reusing the cluster specified in
370
+ `job.settings.job_clusters`."""
347
371
 
348
372
  libraries: Optional[List[compute.Library]] = None
349
- """An optional list of libraries to be installed on the cluster that executes the job. The default
350
- value is an empty list."""
373
+ """An optional list of libraries to be installed on the cluster. The default value is an empty
374
+ list."""
351
375
 
352
376
  new_cluster: Optional[compute.ClusterSpec] = None
353
- """If new_cluster, a description of a cluster that is created for each run."""
377
+ """If new_cluster, a description of a new cluster that is created for each run."""
354
378
 
355
379
  def as_dict(self) -> dict:
356
380
  """Serializes the ClusterSpec into a dictionary suitable for use as a JSON request body."""
357
381
  body = {}
382
+ if self.compute_key is not None: body['compute_key'] = self.compute_key
358
383
  if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
384
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
359
385
  if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
360
386
  if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
361
387
  return body
@@ -363,7 +389,9 @@ class ClusterSpec:
363
389
  @classmethod
364
390
  def from_dict(cls, d: Dict[str, any]) -> ClusterSpec:
365
391
  """Deserializes the ClusterSpec from a dictionary."""
366
- return cls(existing_cluster_id=d.get('existing_cluster_id', None),
392
+ return cls(compute_key=d.get('compute_key', None),
393
+ existing_cluster_id=d.get('existing_cluster_id', None),
394
+ job_cluster_key=d.get('job_cluster_key', None),
367
395
  libraries=_repeated_dict(d, 'libraries', compute.Library),
368
396
  new_cluster=_from_dict(d, 'new_cluster', compute.ClusterSpec))
369
397
 
@@ -376,11 +404,7 @@ class Condition(Enum):
376
404
 
377
405
  @dataclass
378
406
  class ConditionTask:
379
- left: Optional[str] = None
380
- """The left operand of the condition task. Can be either a string value or a job state or parameter
381
- reference."""
382
-
383
- op: Optional[ConditionTaskOp] = None
407
+ op: ConditionTaskOp
384
408
  """* `EQUAL_TO`, `NOT_EQUAL` operators perform string comparison of their operands. This means that
385
409
  `“12.0” == “12”` will evaluate to `false`. * `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`,
386
410
  `LESS_THAN`, `LESS_THAN_OR_EQUAL` operators perform numeric comparison of their operands.
@@ -391,7 +415,11 @@ class ConditionTask:
391
415
  If a task value was set to a boolean value, it will be serialized to `“true”` or
392
416
  `“false”` for the comparison."""
393
417
 
394
- right: Optional[str] = None
418
+ left: str
419
+ """The left operand of the condition task. Can be either a string value or a job state or parameter
420
+ reference."""
421
+
422
+ right: str
395
423
  """The right operand of the condition task. Can be either a string value or a job state or
396
424
  parameter reference."""
397
425
 
@@ -463,7 +491,7 @@ class CreateJob:
463
491
  description: Optional[str] = None
464
492
  """An optional description for the job. The maximum length is 1024 characters in UTF-8 encoding."""
465
493
 
466
- edit_mode: Optional[CreateJobEditMode] = None
494
+ edit_mode: Optional[JobEditMode] = None
467
495
  """Edit mode of the job.
468
496
 
469
497
  * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is
@@ -496,18 +524,14 @@ class CreateJob:
496
524
  task settings."""
497
525
 
498
526
  max_concurrent_runs: Optional[int] = None
499
- """An optional maximum allowed number of concurrent runs of the job.
500
-
501
- Set this value if you want to be able to execute multiple runs of the same job concurrently.
502
- This is useful for example if you trigger your job on a frequent schedule and want to allow
503
- consecutive runs to overlap with each other, or if you want to trigger multiple runs which
504
- differ by their input parameters.
505
-
506
- This setting affects only new runs. For example, suppose the job’s concurrency is 4 and there
507
- are 4 concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active
508
- runs. However, from then on, new runs are skipped unless there are fewer than 3 active runs.
509
-
510
- This value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped."""
527
+ """An optional maximum allowed number of concurrent runs of the job. Set this value if you want to
528
+ be able to execute multiple runs of the same job concurrently. This is useful for example if you
529
+ trigger your job on a frequent schedule and want to allow consecutive runs to overlap with each
530
+ other, or if you want to trigger multiple runs which differ by their input parameters. This
531
+ setting affects only new runs. For example, suppose the job’s concurrency is 4 and there are 4
532
+ concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active runs.
533
+ However, from then on, new runs are skipped unless there are fewer than 3 active runs. This
534
+ value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped."""
511
535
 
512
536
  name: Optional[str] = None
513
537
  """An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding."""
@@ -590,7 +614,7 @@ class CreateJob:
590
614
  continuous=_from_dict(d, 'continuous', Continuous),
591
615
  deployment=_from_dict(d, 'deployment', JobDeployment),
592
616
  description=d.get('description', None),
593
- edit_mode=_enum(d, 'edit_mode', CreateJobEditMode),
617
+ edit_mode=_enum(d, 'edit_mode', JobEditMode),
594
618
  email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
595
619
  format=_enum(d, 'format', Format),
596
620
  git_source=_from_dict(d, 'git_source', GitSource),
@@ -610,18 +634,10 @@ class CreateJob:
610
634
  webhook_notifications=_from_dict(d, 'webhook_notifications', WebhookNotifications))
611
635
 
612
636
 
613
- class CreateJobEditMode(Enum):
614
- """Edit mode of the job.
615
-
616
- * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is
617
- in an editable state and can be modified."""
618
-
619
- EDITABLE = 'EDITABLE'
620
- UI_LOCKED = 'UI_LOCKED'
621
-
622
-
623
637
  @dataclass
624
638
  class CreateResponse:
639
+ """Job was created successfully"""
640
+
625
641
  job_id: Optional[int] = None
626
642
  """The canonical identifier for the newly created job."""
627
643
 
@@ -641,7 +657,7 @@ class CreateResponse:
641
657
  class CronSchedule:
642
658
  quartz_cron_expression: str
643
659
  """A Cron expression using Quartz syntax that describes the schedule for a job. See [Cron Trigger]
644
- for details. This field is required."
660
+ for details. This field is required.
645
661
 
646
662
  [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html"""
647
663
 
@@ -719,12 +735,12 @@ class DbtTask:
719
735
 
720
736
  source: Optional[Source] = None
721
737
  """Optional location type of the project directory. When set to `WORKSPACE`, the project will be
722
- retrieved from the local <Databricks> workspace. When set to `GIT`, the project will be
723
- retrieved from a Git repository defined in `git_source`. If the value is empty, the task will
724
- use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.
738
+ retrieved from the local Databricks workspace. When set to `GIT`, the project will be retrieved
739
+ from a Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if
740
+ `git_source` is defined and `WORKSPACE` otherwise.
725
741
 
726
- * `WORKSPACE`: Project is located in <Databricks> workspace. * `GIT`: Project is located in
727
- cloud Git provider."""
742
+ * `WORKSPACE`: Project is located in Databricks workspace. * `GIT`: Project is located in cloud
743
+ Git provider."""
728
744
 
729
745
  warehouse_id: Optional[str] = None
730
746
  """ID of the SQL warehouse to connect to. If provided, we automatically generate and provide the
@@ -789,7 +805,7 @@ class DeleteResponse:
789
805
  @dataclass
790
806
  class DeleteRun:
791
807
  run_id: int
792
- """The canonical identifier of the run for which to retrieve the metadata."""
808
+ """ID of the run to delete."""
793
809
 
794
810
  def as_dict(self) -> dict:
795
811
  """Serializes the DeleteRun into a dictionary suitable for use as a JSON request body."""
@@ -819,6 +835,8 @@ class DeleteRunResponse:
819
835
 
820
836
  @dataclass
821
837
  class ExportRunOutput:
838
+ """Run was exported successfully."""
839
+
822
840
  views: Optional[List[ViewItem]] = None
823
841
  """The exported content in HTML format (one for every view item). To extract the HTML notebook from
824
842
  the JSON response, download and run this [Python script].
@@ -839,14 +857,14 @@ class ExportRunOutput:
839
857
 
840
858
  @dataclass
841
859
  class FileArrivalTriggerConfiguration:
860
+ url: str
861
+ """URL to be monitored for file arrivals. The path must point to the root or a subpath of the
862
+ external location."""
863
+
842
864
  min_time_between_triggers_seconds: Optional[int] = None
843
865
  """If set, the trigger starts a run only after the specified amount of time passed since the last
844
866
  time the trigger fired. The minimum allowed value is 60 seconds"""
845
867
 
846
- url: Optional[str] = None
847
- """The storage location to monitor for file arrivals. The value must point to the root or a subpath
848
- of an external location URL or the root or subpath of a Unity Catalog volume."""
849
-
850
868
  wait_after_last_change_seconds: Optional[int] = None
851
869
  """If set, the trigger starts a run only after no file activity has occurred for the specified
852
870
  amount of time. This makes it possible to wait for a batch of incoming files to arrive before
@@ -872,7 +890,7 @@ class FileArrivalTriggerConfiguration:
872
890
 
873
891
  @dataclass
874
892
  class ForEachStats:
875
- error_message_stats: Optional[ForEachTaskErrorMessageStats] = None
893
+ error_message_stats: Optional[List[ForEachTaskErrorMessageStats]] = None
876
894
  """Sample of 3 most common error messages occurred during the iteration."""
877
895
 
878
896
  task_run_stats: Optional[ForEachTaskTaskRunStats] = None
@@ -881,14 +899,15 @@ class ForEachStats:
881
899
  def as_dict(self) -> dict:
882
900
  """Serializes the ForEachStats into a dictionary suitable for use as a JSON request body."""
883
901
  body = {}
884
- if self.error_message_stats: body['error_message_stats'] = self.error_message_stats.as_dict()
902
+ if self.error_message_stats:
903
+ body['error_message_stats'] = [v.as_dict() for v in self.error_message_stats]
885
904
  if self.task_run_stats: body['task_run_stats'] = self.task_run_stats.as_dict()
886
905
  return body
887
906
 
888
907
  @classmethod
889
908
  def from_dict(cls, d: Dict[str, any]) -> ForEachStats:
890
909
  """Deserializes the ForEachStats from a dictionary."""
891
- return cls(error_message_stats=_from_dict(d, 'error_message_stats', ForEachTaskErrorMessageStats),
910
+ return cls(error_message_stats=_repeated_dict(d, 'error_message_stats', ForEachTaskErrorMessageStats),
892
911
  task_run_stats=_from_dict(d, 'task_run_stats', ForEachTaskTaskRunStats))
893
912
 
894
913
 
@@ -898,6 +917,7 @@ class ForEachTask:
898
917
  """Array for task to iterate on. This can be a JSON string or a reference to an array parameter."""
899
918
 
900
919
  task: Task
920
+ """Configuration for the task that will be run for each element in the array"""
901
921
 
902
922
  concurrency: Optional[int] = None
903
923
  """Controls the number of active iterations task runs. Default is 20, maximum allowed is 100."""
@@ -920,7 +940,7 @@ class ForEachTask:
920
940
 
921
941
  @dataclass
922
942
  class ForEachTaskErrorMessageStats:
923
- count: Optional[str] = None
943
+ count: Optional[int] = None
924
944
  """Describes the count of such error message encountered during the iterations."""
925
945
 
926
946
  error_message: Optional[str] = None
@@ -1100,6 +1120,8 @@ class GitSource:
1100
1120
 
1101
1121
  @dataclass
1102
1122
  class Job:
1123
+ """Job was retrieved successfully."""
1124
+
1103
1125
  created_time: Optional[int] = None
1104
1126
  """The time at which this job was created in epoch milliseconds (milliseconds since 1/1/1970 UTC)."""
1105
1127
 
@@ -1221,7 +1243,7 @@ class JobCluster:
1221
1243
  `JobTaskSettings` may refer to this field to determine which cluster to launch for the task
1222
1244
  execution."""
1223
1245
 
1224
- new_cluster: Optional[compute.ClusterSpec] = None
1246
+ new_cluster: compute.ClusterSpec
1225
1247
  """If new_cluster, a description of a cluster that is created for each task."""
1226
1248
 
1227
1249
  def as_dict(self) -> dict:
@@ -1285,13 +1307,21 @@ class JobDeployment:
1285
1307
 
1286
1308
 
1287
1309
  class JobDeploymentKind(Enum):
1288
- """The kind of deployment that manages the job.
1289
-
1290
- * `BUNDLE`: The job is managed by Databricks Asset Bundle."""
1310
+ """* `BUNDLE`: The job is managed by Databricks Asset Bundle."""
1291
1311
 
1292
1312
  BUNDLE = 'BUNDLE'
1293
1313
 
1294
1314
 
1315
+ class JobEditMode(Enum):
1316
+ """Edit mode of the job.
1317
+
1318
+ * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is
1319
+ in an editable state and can be modified."""
1320
+
1321
+ EDITABLE = 'EDITABLE'
1322
+ UI_LOCKED = 'UI_LOCKED'
1323
+
1324
+
1295
1325
  @dataclass
1296
1326
  class JobEmailNotifications:
1297
1327
  no_alert_for_skipped_runs: Optional[bool] = None
@@ -1565,7 +1595,7 @@ class JobSettings:
1565
1595
  description: Optional[str] = None
1566
1596
  """An optional description for the job. The maximum length is 1024 characters in UTF-8 encoding."""
1567
1597
 
1568
- edit_mode: Optional[JobSettingsEditMode] = None
1598
+ edit_mode: Optional[JobEditMode] = None
1569
1599
  """Edit mode of the job.
1570
1600
 
1571
1601
  * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is
@@ -1598,18 +1628,14 @@ class JobSettings:
1598
1628
  task settings."""
1599
1629
 
1600
1630
  max_concurrent_runs: Optional[int] = None
1601
- """An optional maximum allowed number of concurrent runs of the job.
1602
-
1603
- Set this value if you want to be able to execute multiple runs of the same job concurrently.
1604
- This is useful for example if you trigger your job on a frequent schedule and want to allow
1605
- consecutive runs to overlap with each other, or if you want to trigger multiple runs which
1606
- differ by their input parameters.
1607
-
1608
- This setting affects only new runs. For example, suppose the job’s concurrency is 4 and there
1609
- are 4 concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active
1610
- runs. However, from then on, new runs are skipped unless there are fewer than 3 active runs.
1611
-
1612
- This value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped."""
1631
+ """An optional maximum allowed number of concurrent runs of the job. Set this value if you want to
1632
+ be able to execute multiple runs of the same job concurrently. This is useful for example if you
1633
+ trigger your job on a frequent schedule and want to allow consecutive runs to overlap with each
1634
+ other, or if you want to trigger multiple runs which differ by their input parameters. This
1635
+ setting affects only new runs. For example, suppose the job’s concurrency is 4 and there are 4
1636
+ concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active runs.
1637
+ However, from then on, new runs are skipped unless there are fewer than 3 active runs. This
1638
+ value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped."""
1613
1639
 
1614
1640
  name: Optional[str] = None
1615
1641
  """An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding."""
@@ -1689,7 +1715,7 @@ class JobSettings:
1689
1715
  continuous=_from_dict(d, 'continuous', Continuous),
1690
1716
  deployment=_from_dict(d, 'deployment', JobDeployment),
1691
1717
  description=d.get('description', None),
1692
- edit_mode=_enum(d, 'edit_mode', JobSettingsEditMode),
1718
+ edit_mode=_enum(d, 'edit_mode', JobEditMode),
1693
1719
  email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
1694
1720
  format=_enum(d, 'format', Format),
1695
1721
  git_source=_from_dict(d, 'git_source', GitSource),
@@ -1709,16 +1735,6 @@ class JobSettings:
1709
1735
  webhook_notifications=_from_dict(d, 'webhook_notifications', WebhookNotifications))
1710
1736
 
1711
1737
 
1712
- class JobSettingsEditMode(Enum):
1713
- """Edit mode of the job.
1714
-
1715
- * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is
1716
- in an editable state and can be modified."""
1717
-
1718
- EDITABLE = 'EDITABLE'
1719
- UI_LOCKED = 'UI_LOCKED'
1720
-
1721
-
1722
1738
  @dataclass
1723
1739
  class JobSource:
1724
1740
  """The source of the job specification in the remote repository when the job is source controlled."""
@@ -1784,13 +1800,13 @@ class JobsHealthOperator(Enum):
1784
1800
 
1785
1801
  @dataclass
1786
1802
  class JobsHealthRule:
1787
- metric: Optional[JobsHealthMetric] = None
1803
+ metric: JobsHealthMetric
1788
1804
  """Specifies the health metric that is being evaluated for a particular health rule."""
1789
1805
 
1790
- op: Optional[JobsHealthOperator] = None
1806
+ op: JobsHealthOperator
1791
1807
  """Specifies the operator used to compare the health metric value with the specified threshold."""
1792
1808
 
1793
- value: Optional[int] = None
1809
+ value: int
1794
1810
  """Specifies the threshold value that the health metric should obey to satisfy the health rule."""
1795
1811
 
1796
1812
  def as_dict(self) -> dict:
@@ -1829,6 +1845,8 @@ class JobsHealthRules:
1829
1845
 
1830
1846
  @dataclass
1831
1847
  class ListJobsResponse:
1848
+ """List of jobs was retrieved successfully."""
1849
+
1832
1850
  has_more: Optional[bool] = None
1833
1851
  """If true, additional jobs matching the provided filter are available for listing."""
1834
1852
 
@@ -1861,6 +1879,8 @@ class ListJobsResponse:
1861
1879
 
1862
1880
  @dataclass
1863
1881
  class ListRunsResponse:
1882
+ """List of runs was retrieved successfully."""
1883
+
1864
1884
  has_more: Optional[bool] = None
1865
1885
  """If true, additional runs matching the provided filter are available for listing."""
1866
1886
 
@@ -1892,18 +1912,6 @@ class ListRunsResponse:
1892
1912
  runs=_repeated_dict(d, 'runs', BaseRun))
1893
1913
 
1894
1914
 
1895
- class ListRunsRunType(Enum):
1896
- """* `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow
1897
- run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with
1898
- :method:jobs/submit.
1899
-
1900
- [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow"""
1901
-
1902
- JOB_RUN = 'JOB_RUN'
1903
- SUBMIT_RUN = 'SUBMIT_RUN'
1904
- WORKFLOW_RUN = 'WORKFLOW_RUN'
1905
-
1906
-
1907
1915
  @dataclass
1908
1916
  class NotebookOutput:
1909
1917
  result: Optional[str] = None
@@ -1938,10 +1946,9 @@ class NotebookTask:
1938
1946
 
1939
1947
  base_parameters: Optional[Dict[str, str]] = None
1940
1948
  """Base parameters to be used for each run of this job. If the run is initiated by a call to
1941
- :method:jobs/runNow with parameters specified, the two parameters maps are merged. If the same
1942
- key is specified in `base_parameters` and in `run-now`, the value from `run-now` is used.
1943
-
1944
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
1949
+ :method:jobs/run Now with parameters specified, the two parameters maps are merged. If the same
1950
+ key is specified in `base_parameters` and in `run-now`, the value from `run-now` is used. Use
1951
+ [Task parameter variables] to set parameters containing information about job runs.
1945
1952
 
1946
1953
  If the notebook takes a parameter that is not specified in the job’s `base_parameters` or the
1947
1954
  `run-now` override parameters, the default value from the notebook is used.
@@ -1950,17 +1957,15 @@ class NotebookTask:
1950
1957
 
1951
1958
  The JSON representation of this field cannot exceed 1MB.
1952
1959
 
1953
- [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets
1954
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
1960
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
1961
+ [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets"""
1955
1962
 
1956
1963
  source: Optional[Source] = None
1957
1964
  """Optional location type of the notebook. When set to `WORKSPACE`, the notebook will be retrieved
1958
- from the local <Databricks> workspace. When set to `GIT`, the notebook will be retrieved from a
1965
+ from the local Databricks workspace. When set to `GIT`, the notebook will be retrieved from a
1959
1966
  Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if
1960
- `git_source` is defined and `WORKSPACE` otherwise.
1961
-
1962
- * `WORKSPACE`: Notebook is located in <Databricks> workspace. * `GIT`: Notebook is located in
1963
- cloud Git provider."""
1967
+ `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: Notebook is located in
1968
+ Databricks workspace. * `GIT`: Notebook is located in cloud Git provider."""
1964
1969
 
1965
1970
  def as_dict(self) -> dict:
1966
1971
  """Serializes the NotebookTask into a dictionary suitable for use as a JSON request body."""
@@ -1978,9 +1983,6 @@ class NotebookTask:
1978
1983
  source=_enum(d, 'source', Source))
1979
1984
 
1980
1985
 
1981
- ParamPairs = Dict[str, str]
1982
-
1983
-
1984
1986
  class PauseStatus(Enum):
1985
1987
 
1986
1988
  PAUSED = 'PAUSED'
@@ -2006,12 +2008,12 @@ class PipelineParams:
2006
2008
 
2007
2009
  @dataclass
2008
2010
  class PipelineTask:
2009
- full_refresh: Optional[bool] = None
2010
- """If true, a full refresh will be triggered on the delta live table."""
2011
-
2012
- pipeline_id: Optional[str] = None
2011
+ pipeline_id: str
2013
2012
  """The full name of the pipeline task to execute."""
2014
2013
 
2014
+ full_refresh: Optional[bool] = None
2015
+ """If true, triggers a full refresh on the delta live table."""
2016
+
2015
2017
  def as_dict(self) -> dict:
2016
2018
  """Serializes the PipelineTask into a dictionary suitable for use as a JSON request body."""
2017
2019
  body = {}
@@ -2027,7 +2029,10 @@ class PipelineTask:
2027
2029
 
2028
2030
  @dataclass
2029
2031
  class PythonWheelTask:
2030
- entry_point: Optional[str] = None
2032
+ package_name: str
2033
+ """Name of the package to execute"""
2034
+
2035
+ entry_point: str
2031
2036
  """Named entry point to use, if it does not exist in the metadata of the package it executes the
2032
2037
  function from the package directly using `$packageName.$entryPoint()`"""
2033
2038
 
@@ -2035,9 +2040,6 @@ class PythonWheelTask:
2035
2040
  """Command-line parameters passed to Python wheel task in the form of `["--name=task",
2036
2041
  "--data=dbfs:/path/to/data.json"]`. Leave it empty if `parameters` is not null."""
2037
2042
 
2038
- package_name: Optional[str] = None
2039
- """Name of the package to execute"""
2040
-
2041
2043
  parameters: Optional[List[str]] = None
2042
2044
  """Command-line parameters passed to Python wheel task. Leave it empty if `named_parameters` is not
2043
2045
  null."""
@@ -2133,7 +2135,7 @@ class RepairRun:
2133
2135
 
2134
2136
  dbt_commands: Optional[List[str]] = None
2135
2137
  """An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
2136
- deps", "dbt seed", "dbt run"]`"""
2138
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`"""
2137
2139
 
2138
2140
  jar_params: Optional[List[str]] = None
2139
2141
  """A list of parameters for jobs with Spark JAR tasks, for example `"jar_params": ["john doe",
@@ -2142,9 +2144,8 @@ class RepairRun:
2142
2144
  be specified in conjunction with notebook_params. The JSON representation of this field (for
2143
2145
  example `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2144
2146
 
2145
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2146
-
2147
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2147
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
2148
+ information about job runs."""
2148
2149
 
2149
2150
  job_parameters: Optional[Dict[str, str]] = None
2150
2151
  """Job-level parameters used in the run. for example `"param": "overriding_val"`"""
@@ -2162,13 +2163,13 @@ class RepairRun:
2162
2163
 
2163
2164
  notebook_params cannot be specified in conjunction with jar_params.
2164
2165
 
2165
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2166
+ Use [Task parameter variables] to set parameters containing information about job runs.
2166
2167
 
2167
2168
  The JSON representation of this field (for example `{"notebook_params":{"name":"john
2168
2169
  doe","age":"35"}}`) cannot exceed 10,000 bytes.
2169
2170
 
2170
- [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
2171
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2171
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
2172
+ [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
2172
2173
 
2173
2174
  pipeline_params: Optional[PipelineParams] = None
2174
2175
 
@@ -2182,7 +2183,7 @@ class RepairRun:
2182
2183
  `run-now`, it would overwrite the parameters specified in job setting. The JSON representation
2183
2184
  of this field (for example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2184
2185
 
2185
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2186
+ Use [Task parameter variables] to set parameters containing information about job runs.
2186
2187
 
2187
2188
  Important
2188
2189
 
@@ -2190,7 +2191,7 @@ class RepairRun:
2190
2191
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2191
2192
  emojis.
2192
2193
 
2193
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2194
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2194
2195
 
2195
2196
  rerun_all_failed_tasks: Optional[bool] = None
2196
2197
  """If true, repair all failed tasks. Only one of `rerun_tasks` or `rerun_all_failed_tasks` can be
@@ -2210,7 +2211,7 @@ class RepairRun:
2210
2211
  parameters specified in job setting. The JSON representation of this field (for example
2211
2212
  `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2212
2213
 
2213
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2214
+ Use [Task parameter variables] to set parameters containing information about job runs
2214
2215
 
2215
2216
  Important
2216
2217
 
@@ -2218,7 +2219,7 @@ class RepairRun:
2218
2219
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2219
2220
  emojis.
2220
2221
 
2221
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2222
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2222
2223
 
2223
2224
  sql_params: Optional[Dict[str, str]] = None
2224
2225
  """A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john
@@ -2265,6 +2266,8 @@ class RepairRun:
2265
2266
 
2266
2267
  @dataclass
2267
2268
  class RepairRunResponse:
2269
+ """Run repair was initiated."""
2270
+
2268
2271
  repair_id: Optional[int] = None
2269
2272
  """The ID of the repair. Must be provided in subsequent repairs using the `latest_repair_id` field
2270
2273
  to ensure sequential repairs."""
@@ -2407,21 +2410,21 @@ class ResolvedPythonWheelTaskValues:
2407
2410
 
2408
2411
  @dataclass
2409
2412
  class ResolvedRunJobTaskValues:
2410
- named_parameters: Optional[Dict[str, str]] = None
2413
+ job_parameters: Optional[Dict[str, str]] = None
2411
2414
 
2412
2415
  parameters: Optional[Dict[str, str]] = None
2413
2416
 
2414
2417
  def as_dict(self) -> dict:
2415
2418
  """Serializes the ResolvedRunJobTaskValues into a dictionary suitable for use as a JSON request body."""
2416
2419
  body = {}
2417
- if self.named_parameters: body['named_parameters'] = self.named_parameters
2420
+ if self.job_parameters: body['job_parameters'] = self.job_parameters
2418
2421
  if self.parameters: body['parameters'] = self.parameters
2419
2422
  return body
2420
2423
 
2421
2424
  @classmethod
2422
2425
  def from_dict(cls, d: Dict[str, any]) -> ResolvedRunJobTaskValues:
2423
2426
  """Deserializes the ResolvedRunJobTaskValues from a dictionary."""
2424
- return cls(named_parameters=d.get('named_parameters', None), parameters=d.get('parameters', None))
2427
+ return cls(job_parameters=d.get('job_parameters', None), parameters=d.get('parameters', None))
2425
2428
 
2426
2429
 
2427
2430
  @dataclass
@@ -2518,6 +2521,9 @@ class Run:
2518
2521
  """The creator user name. This field won’t be included in the response if the user has already
2519
2522
  been deleted."""
2520
2523
 
2524
+ description: Optional[str] = None
2525
+ """Description of the run"""
2526
+
2521
2527
  end_time: Optional[int] = None
2522
2528
  """The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
2523
2529
  field is set to 0 if the job is still running."""
@@ -2560,6 +2566,9 @@ class Run:
2560
2566
  overriding_parameters: Optional[RunParameters] = None
2561
2567
  """The parameters used for this run."""
2562
2568
 
2569
+ queue_duration: Optional[int] = None
2570
+ """The time in milliseconds that the run has spent in the queue."""
2571
+
2563
2572
  repair_history: Optional[List[RepairHistoryItem]] = None
2564
2573
  """The repair history of the run."""
2565
2574
 
@@ -2576,9 +2585,9 @@ class Run:
2576
2585
  """The URL to the detail page of the run."""
2577
2586
 
2578
2587
  run_type: Optional[RunType] = None
2579
- """* `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow
2580
- run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with
2581
- :method:jobs/submit.
2588
+ """The type of a run. * `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. *
2589
+ `WORKFLOW_RUN`: Workflow run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit
2590
+ run. A run created with :method:jobs/submit.
2582
2591
 
2583
2592
  [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow"""
2584
2593
 
@@ -2616,6 +2625,7 @@ class Run:
2616
2625
  triggered by a table update."""
2617
2626
 
2618
2627
  trigger_info: Optional[TriggerInfo] = None
2628
+ """Additional details about what triggered the run"""
2619
2629
 
2620
2630
  def as_dict(self) -> dict:
2621
2631
  """Serializes the Run into a dictionary suitable for use as a JSON request body."""
@@ -2625,6 +2635,7 @@ class Run:
2625
2635
  if self.cluster_instance: body['cluster_instance'] = self.cluster_instance.as_dict()
2626
2636
  if self.cluster_spec: body['cluster_spec'] = self.cluster_spec.as_dict()
2627
2637
  if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
2638
+ if self.description is not None: body['description'] = self.description
2628
2639
  if self.end_time is not None: body['end_time'] = self.end_time
2629
2640
  if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
2630
2641
  if self.git_source: body['git_source'] = self.git_source.as_dict()
@@ -2635,6 +2646,7 @@ class Run:
2635
2646
  if self.original_attempt_run_id is not None:
2636
2647
  body['original_attempt_run_id'] = self.original_attempt_run_id
2637
2648
  if self.overriding_parameters: body['overriding_parameters'] = self.overriding_parameters.as_dict()
2649
+ if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
2638
2650
  if self.repair_history: body['repair_history'] = [v.as_dict() for v in self.repair_history]
2639
2651
  if self.run_duration is not None: body['run_duration'] = self.run_duration
2640
2652
  if self.run_id is not None: body['run_id'] = self.run_id
@@ -2658,6 +2670,7 @@ class Run:
2658
2670
  cluster_instance=_from_dict(d, 'cluster_instance', ClusterInstance),
2659
2671
  cluster_spec=_from_dict(d, 'cluster_spec', ClusterSpec),
2660
2672
  creator_user_name=d.get('creator_user_name', None),
2673
+ description=d.get('description', None),
2661
2674
  end_time=d.get('end_time', None),
2662
2675
  execution_duration=d.get('execution_duration', None),
2663
2676
  git_source=_from_dict(d, 'git_source', GitSource),
@@ -2667,6 +2680,7 @@ class Run:
2667
2680
  number_in_job=d.get('number_in_job', None),
2668
2681
  original_attempt_run_id=d.get('original_attempt_run_id', None),
2669
2682
  overriding_parameters=_from_dict(d, 'overriding_parameters', RunParameters),
2683
+ queue_duration=d.get('queue_duration', None),
2670
2684
  repair_history=_repeated_dict(d, 'repair_history', RepairHistoryItem),
2671
2685
  run_duration=d.get('run_duration', None),
2672
2686
  run_id=d.get('run_id', None),
@@ -2684,14 +2698,24 @@ class Run:
2684
2698
 
2685
2699
  @dataclass
2686
2700
  class RunConditionTask:
2701
+ op: ConditionTaskOp
2702
+ """* `EQUAL_TO`, `NOT_EQUAL` operators perform string comparison of their operands. This means that
2703
+ `“12.0” == “12”` will evaluate to `false`. * `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`,
2704
+ `LESS_THAN`, `LESS_THAN_OR_EQUAL` operators perform numeric comparison of their operands.
2705
+ `“12.0” >= “12”` will evaluate to `true`, `“10.0” >= “12”` will evaluate to
2706
+ `false`.
2707
+
2708
+ The boolean comparison to task values can be implemented with operators `EQUAL_TO`, `NOT_EQUAL`.
2709
+ If a task value was set to a boolean value, it will be serialized to `“true”` or
2710
+ `“false”` for the comparison."""
2711
+
2687
2712
  left: str
2688
- """The left operand of the condition task."""
2713
+ """The left operand of the condition task. Can be either a string value or a job state or parameter
2714
+ reference."""
2689
2715
 
2690
2716
  right: str
2691
- """The right operand of the condition task."""
2692
-
2693
- op: RunConditionTaskOp
2694
- """The condtion task operator."""
2717
+ """The right operand of the condition task. Can be either a string value or a job state or
2718
+ parameter reference."""
2695
2719
 
2696
2720
  outcome: Optional[str] = None
2697
2721
  """The condition expression evaluation result. Filled in if the task was successfully completed.
@@ -2710,33 +2734,25 @@ class RunConditionTask:
2710
2734
  def from_dict(cls, d: Dict[str, any]) -> RunConditionTask:
2711
2735
  """Deserializes the RunConditionTask from a dictionary."""
2712
2736
  return cls(left=d.get('left', None),
2713
- op=_enum(d, 'op', RunConditionTaskOp),
2737
+ op=_enum(d, 'op', ConditionTaskOp),
2714
2738
  outcome=d.get('outcome', None),
2715
2739
  right=d.get('right', None))
2716
2740
 
2717
2741
 
2718
- class RunConditionTaskOp(Enum):
2719
- """The condtion task operator."""
2720
-
2721
- EQUAL_TO = 'EQUAL_TO'
2722
- GREATER_THAN = 'GREATER_THAN'
2723
- GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL'
2724
- LESS_THAN = 'LESS_THAN'
2725
- LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL'
2726
- NOT_EQUAL = 'NOT_EQUAL'
2727
-
2728
-
2729
2742
  @dataclass
2730
2743
  class RunForEachTask:
2744
+ inputs: str
2745
+ """Array for task to iterate on. This can be a JSON string or a reference to an array parameter."""
2746
+
2747
+ task: Task
2748
+ """Configuration for the task that will be run for each element in the array"""
2749
+
2731
2750
  concurrency: Optional[int] = None
2732
2751
  """Controls the number of active iterations task runs. Default is 20, maximum allowed is 100."""
2733
2752
 
2734
- inputs: Optional[str] = None
2735
- """Array for task to iterate on. This can be a JSON string or a reference to an array parameter."""
2736
-
2737
2753
  stats: Optional[ForEachStats] = None
2738
-
2739
- task: Optional[Task] = None
2754
+ """Read only field. Populated for GetRun and ListRuns RPC calls and stores the execution stats of
2755
+ an For each task"""
2740
2756
 
2741
2757
  def as_dict(self) -> dict:
2742
2758
  """Serializes the RunForEachTask into a dictionary suitable for use as a JSON request body."""
@@ -2796,20 +2812,111 @@ class RunJobTask:
2796
2812
  job_id: int
2797
2813
  """ID of the job to trigger."""
2798
2814
 
2815
+ dbt_commands: Optional[List[str]] = None
2816
+ """An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
2817
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`"""
2818
+
2819
+ jar_params: Optional[List[str]] = None
2820
+ """A list of parameters for jobs with Spark JAR tasks, for example `"jar_params": ["john doe",
2821
+ "35"]`. The parameters are used to invoke the main function of the main class specified in the
2822
+ Spark JAR task. If not specified upon `run-now`, it defaults to an empty list. jar_params cannot
2823
+ be specified in conjunction with notebook_params. The JSON representation of this field (for
2824
+ example `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2825
+
2826
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
2827
+ information about job runs."""
2828
+
2799
2829
  job_parameters: Optional[Dict[str, str]] = None
2800
2830
  """Job-level parameters used to trigger the job."""
2801
2831
 
2832
+ notebook_params: Optional[Dict[str, str]] = None
2833
+ """A map from keys to values for jobs with notebook task, for example `"notebook_params": {"name":
2834
+ "john doe", "age": "35"}`. The map is passed to the notebook and is accessible through the
2835
+ [dbutils.widgets.get] function.
2836
+
2837
+ If not specified upon `run-now`, the triggered run uses the job’s base parameters.
2838
+
2839
+ notebook_params cannot be specified in conjunction with jar_params.
2840
+
2841
+ Use [Task parameter variables] to set parameters containing information about job runs.
2842
+
2843
+ The JSON representation of this field (for example `{"notebook_params":{"name":"john
2844
+ doe","age":"35"}}`) cannot exceed 10,000 bytes.
2845
+
2846
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
2847
+ [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
2848
+
2849
+ pipeline_params: Optional[PipelineParams] = None
2850
+
2851
+ python_named_params: Optional[Dict[str, str]] = None
2852
+ """A map from keys to values for jobs with Python wheel task, for example `"python_named_params":
2853
+ {"name": "task", "data": "dbfs:/path/to/data.json"}`."""
2854
+
2855
+ python_params: Optional[List[str]] = None
2856
+ """A list of parameters for jobs with Python tasks, for example `"python_params": ["john doe",
2857
+ "35"]`. The parameters are passed to Python file as command-line parameters. If specified upon
2858
+ `run-now`, it would overwrite the parameters specified in job setting. The JSON representation
2859
+ of this field (for example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2860
+
2861
+ Use [Task parameter variables] to set parameters containing information about job runs.
2862
+
2863
+ Important
2864
+
2865
+ These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters
2866
+ returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2867
+ emojis.
2868
+
2869
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2870
+
2871
+ spark_submit_params: Optional[List[str]] = None
2872
+ """A list of parameters for jobs with spark submit task, for example `"spark_submit_params":
2873
+ ["--class", "org.apache.spark.examples.SparkPi"]`. The parameters are passed to spark-submit
2874
+ script as command-line parameters. If specified upon `run-now`, it would overwrite the
2875
+ parameters specified in job setting. The JSON representation of this field (for example
2876
+ `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2877
+
2878
+ Use [Task parameter variables] to set parameters containing information about job runs
2879
+
2880
+ Important
2881
+
2882
+ These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters
2883
+ returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2884
+ emojis.
2885
+
2886
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2887
+
2888
+ sql_params: Optional[Dict[str, str]] = None
2889
+ """A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john
2890
+ doe", "age": "35"}`. The SQL alert task does not support custom parameters."""
2891
+
2802
2892
  def as_dict(self) -> dict:
2803
2893
  """Serializes the RunJobTask into a dictionary suitable for use as a JSON request body."""
2804
2894
  body = {}
2895
+ if self.dbt_commands: body['dbt_commands'] = [v for v in self.dbt_commands]
2896
+ if self.jar_params: body['jar_params'] = [v for v in self.jar_params]
2805
2897
  if self.job_id is not None: body['job_id'] = self.job_id
2806
2898
  if self.job_parameters: body['job_parameters'] = self.job_parameters
2899
+ if self.notebook_params: body['notebook_params'] = self.notebook_params
2900
+ if self.pipeline_params: body['pipeline_params'] = self.pipeline_params.as_dict()
2901
+ if self.python_named_params: body['python_named_params'] = self.python_named_params
2902
+ if self.python_params: body['python_params'] = [v for v in self.python_params]
2903
+ if self.spark_submit_params: body['spark_submit_params'] = [v for v in self.spark_submit_params]
2904
+ if self.sql_params: body['sql_params'] = self.sql_params
2807
2905
  return body
2808
2906
 
2809
2907
  @classmethod
2810
2908
  def from_dict(cls, d: Dict[str, any]) -> RunJobTask:
2811
2909
  """Deserializes the RunJobTask from a dictionary."""
2812
- return cls(job_id=d.get('job_id', None), job_parameters=d.get('job_parameters', None))
2910
+ return cls(dbt_commands=d.get('dbt_commands', None),
2911
+ jar_params=d.get('jar_params', None),
2912
+ job_id=d.get('job_id', None),
2913
+ job_parameters=d.get('job_parameters', None),
2914
+ notebook_params=d.get('notebook_params', None),
2915
+ pipeline_params=_from_dict(d, 'pipeline_params', PipelineParams),
2916
+ python_named_params=d.get('python_named_params', None),
2917
+ python_params=d.get('python_params', None),
2918
+ spark_submit_params=d.get('spark_submit_params', None),
2919
+ sql_params=d.get('sql_params', None))
2813
2920
 
2814
2921
 
2815
2922
  class RunLifeCycleState(Enum):
@@ -2843,7 +2950,7 @@ class RunNow:
2843
2950
 
2844
2951
  dbt_commands: Optional[List[str]] = None
2845
2952
  """An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
2846
- deps", "dbt seed", "dbt run"]`"""
2953
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`"""
2847
2954
 
2848
2955
  idempotency_token: Optional[str] = None
2849
2956
  """An optional token to guarantee the idempotency of job run requests. If a run with the provided
@@ -2866,9 +2973,8 @@ class RunNow:
2866
2973
  be specified in conjunction with notebook_params. The JSON representation of this field (for
2867
2974
  example `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2868
2975
 
2869
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2870
-
2871
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2976
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
2977
+ information about job runs."""
2872
2978
 
2873
2979
  job_parameters: Optional[Dict[str, str]] = None
2874
2980
  """Job-level parameters used in the run. for example `"param": "overriding_val"`"""
@@ -2882,13 +2988,13 @@ class RunNow:
2882
2988
 
2883
2989
  notebook_params cannot be specified in conjunction with jar_params.
2884
2990
 
2885
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
2991
+ Use [Task parameter variables] to set parameters containing information about job runs.
2886
2992
 
2887
2993
  The JSON representation of this field (for example `{"notebook_params":{"name":"john
2888
2994
  doe","age":"35"}}`) cannot exceed 10,000 bytes.
2889
2995
 
2890
- [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
2891
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
2996
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
2997
+ [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
2892
2998
 
2893
2999
  pipeline_params: Optional[PipelineParams] = None
2894
3000
 
@@ -2902,7 +3008,7 @@ class RunNow:
2902
3008
  `run-now`, it would overwrite the parameters specified in job setting. The JSON representation
2903
3009
  of this field (for example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2904
3010
 
2905
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3011
+ Use [Task parameter variables] to set parameters containing information about job runs.
2906
3012
 
2907
3013
  Important
2908
3014
 
@@ -2910,7 +3016,7 @@ class RunNow:
2910
3016
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2911
3017
  emojis.
2912
3018
 
2913
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3019
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2914
3020
 
2915
3021
  queue: Optional[QueueSettings] = None
2916
3022
  """The queue settings of the run."""
@@ -2922,7 +3028,7 @@ class RunNow:
2922
3028
  parameters specified in job setting. The JSON representation of this field (for example
2923
3029
  `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
2924
3030
 
2925
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3031
+ Use [Task parameter variables] to set parameters containing information about job runs
2926
3032
 
2927
3033
  Important
2928
3034
 
@@ -2930,7 +3036,7 @@ class RunNow:
2930
3036
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
2931
3037
  emojis.
2932
3038
 
2933
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3039
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
2934
3040
 
2935
3041
  sql_params: Optional[Dict[str, str]] = None
2936
3042
  """A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john
@@ -2972,6 +3078,8 @@ class RunNow:
2972
3078
 
2973
3079
  @dataclass
2974
3080
  class RunNowResponse:
3081
+ """Run was started successfully."""
3082
+
2975
3083
  number_in_job: Optional[int] = None
2976
3084
  """A unique identifier for this job run. This is set to the same value as `run_id`."""
2977
3085
 
@@ -2993,6 +3101,8 @@ class RunNowResponse:
2993
3101
 
2994
3102
  @dataclass
2995
3103
  class RunOutput:
3104
+ """Run output was retrieved successfully."""
3105
+
2996
3106
  dbt_output: Optional[DbtOutput] = None
2997
3107
  """The output of a dbt task, if available."""
2998
3108
 
@@ -3003,6 +3113,8 @@ class RunOutput:
3003
3113
  error_trace: Optional[str] = None
3004
3114
  """If there was an error executing the run, this field contains any available stack traces."""
3005
3115
 
3116
+ info: Optional[str] = None
3117
+
3006
3118
  logs: Optional[str] = None
3007
3119
  """The output from tasks that write to standard streams (stdout/stderr) such as spark_jar_task,
3008
3120
  spark_python_task, python_wheel_task.
@@ -3020,10 +3132,11 @@ class RunOutput:
3020
3132
  notebook_output: Optional[NotebookOutput] = None
3021
3133
  """The output of a notebook task, if available. A notebook task that terminates (either
3022
3134
  successfully or with a failure) without calling `dbutils.notebook.exit()` is considered to have
3023
- an empty output. This field is set but its result value is empty. <Databricks> restricts this
3024
- API to return the first 5 MB of the output. To return a larger result, use the
3025
- [ClusterLogConf](/dev-tools/api/latest/clusters.html#clusterlogconf) field to configure log
3026
- storage for the job cluster."""
3135
+ an empty output. This field is set but its result value is empty. Databricks restricts this API
3136
+ to return the first 5 MB of the output. To return a larger result, use the [ClusterLogConf]
3137
+ field to configure log storage for the job cluster.
3138
+
3139
+ [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf"""
3027
3140
 
3028
3141
  run_job_output: Optional[RunJobOutput] = None
3029
3142
  """The output of a run job task, if available"""
@@ -3037,6 +3150,7 @@ class RunOutput:
3037
3150
  if self.dbt_output: body['dbt_output'] = self.dbt_output.as_dict()
3038
3151
  if self.error is not None: body['error'] = self.error
3039
3152
  if self.error_trace is not None: body['error_trace'] = self.error_trace
3153
+ if self.info is not None: body['info'] = self.info
3040
3154
  if self.logs is not None: body['logs'] = self.logs
3041
3155
  if self.logs_truncated is not None: body['logs_truncated'] = self.logs_truncated
3042
3156
  if self.metadata: body['metadata'] = self.metadata.as_dict()
@@ -3051,6 +3165,7 @@ class RunOutput:
3051
3165
  return cls(dbt_output=_from_dict(d, 'dbt_output', DbtOutput),
3052
3166
  error=d.get('error', None),
3053
3167
  error_trace=d.get('error_trace', None),
3168
+ info=d.get('info', None),
3054
3169
  logs=d.get('logs', None),
3055
3170
  logs_truncated=d.get('logs_truncated', None),
3056
3171
  metadata=_from_dict(d, 'metadata', Run),
@@ -3063,7 +3178,7 @@ class RunOutput:
3063
3178
  class RunParameters:
3064
3179
  dbt_commands: Optional[List[str]] = None
3065
3180
  """An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
3066
- deps", "dbt seed", "dbt run"]`"""
3181
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`"""
3067
3182
 
3068
3183
  jar_params: Optional[List[str]] = None
3069
3184
  """A list of parameters for jobs with Spark JAR tasks, for example `"jar_params": ["john doe",
@@ -3072,12 +3187,8 @@ class RunParameters:
3072
3187
  be specified in conjunction with notebook_params. The JSON representation of this field (for
3073
3188
  example `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
3074
3189
 
3075
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3076
-
3077
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3078
-
3079
- job_parameters: Optional[Dict[str, str]] = None
3080
- """Job-level parameters used in the run. for example `"param": "overriding_val"`"""
3190
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
3191
+ information about job runs."""
3081
3192
 
3082
3193
  notebook_params: Optional[Dict[str, str]] = None
3083
3194
  """A map from keys to values for jobs with notebook task, for example `"notebook_params": {"name":
@@ -3088,13 +3199,13 @@ class RunParameters:
3088
3199
 
3089
3200
  notebook_params cannot be specified in conjunction with jar_params.
3090
3201
 
3091
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3202
+ Use [Task parameter variables] to set parameters containing information about job runs.
3092
3203
 
3093
3204
  The JSON representation of this field (for example `{"notebook_params":{"name":"john
3094
3205
  doe","age":"35"}}`) cannot exceed 10,000 bytes.
3095
3206
 
3096
- [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
3097
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3207
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
3208
+ [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html"""
3098
3209
 
3099
3210
  pipeline_params: Optional[PipelineParams] = None
3100
3211
 
@@ -3108,7 +3219,7 @@ class RunParameters:
3108
3219
  `run-now`, it would overwrite the parameters specified in job setting. The JSON representation
3109
3220
  of this field (for example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
3110
3221
 
3111
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3222
+ Use [Task parameter variables] to set parameters containing information about job runs.
3112
3223
 
3113
3224
  Important
3114
3225
 
@@ -3116,7 +3227,7 @@ class RunParameters:
3116
3227
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
3117
3228
  emojis.
3118
3229
 
3119
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3230
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
3120
3231
 
3121
3232
  spark_submit_params: Optional[List[str]] = None
3122
3233
  """A list of parameters for jobs with spark submit task, for example `"spark_submit_params":
@@ -3125,7 +3236,7 @@ class RunParameters:
3125
3236
  parameters specified in job setting. The JSON representation of this field (for example
3126
3237
  `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
3127
3238
 
3128
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3239
+ Use [Task parameter variables] to set parameters containing information about job runs
3129
3240
 
3130
3241
  Important
3131
3242
 
@@ -3133,7 +3244,7 @@ class RunParameters:
3133
3244
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
3134
3245
  emojis.
3135
3246
 
3136
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3247
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
3137
3248
 
3138
3249
  sql_params: Optional[Dict[str, str]] = None
3139
3250
  """A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john
@@ -3144,7 +3255,6 @@ class RunParameters:
3144
3255
  body = {}
3145
3256
  if self.dbt_commands: body['dbt_commands'] = [v for v in self.dbt_commands]
3146
3257
  if self.jar_params: body['jar_params'] = [v for v in self.jar_params]
3147
- if self.job_parameters: body['job_parameters'] = self.job_parameters
3148
3258
  if self.notebook_params: body['notebook_params'] = self.notebook_params
3149
3259
  if self.pipeline_params: body['pipeline_params'] = self.pipeline_params.as_dict()
3150
3260
  if self.python_named_params: body['python_named_params'] = self.python_named_params
@@ -3158,7 +3268,6 @@ class RunParameters:
3158
3268
  """Deserializes the RunParameters from a dictionary."""
3159
3269
  return cls(dbt_commands=d.get('dbt_commands', None),
3160
3270
  jar_params=d.get('jar_params', None),
3161
- job_parameters=d.get('job_parameters', None),
3162
3271
  notebook_params=d.get('notebook_params', None),
3163
3272
  pipeline_params=_from_dict(d, 'pipeline_params', PipelineParams),
3164
3273
  python_named_params=d.get('python_named_params', None),
@@ -3233,6 +3342,13 @@ class RunState:
3233
3342
 
3234
3343
  @dataclass
3235
3344
  class RunTask:
3345
+ """Used when outputting a child run, in GetRun or ListRuns."""
3346
+
3347
+ task_key: str
3348
+ """A unique name for the task. This field is used to refer to this task from other tasks. This
3349
+ field is required and must be unique within its parent job. On Update or Reset, this field is
3350
+ used to reference the tasks to be updated or reset."""
3351
+
3236
3352
  attempt_number: Optional[int] = None
3237
3353
  """The sequence number of this run attempt for a triggered job run. The initial attempt of a run
3238
3354
  has an attempt_number of 0\. If the initial run attempt fails, and the job has a retry policy
@@ -3250,6 +3366,10 @@ class RunTask:
3250
3366
  """The cluster used for this run. If the run is specified to use a new cluster, this field is set
3251
3367
  once the Jobs service has requested a cluster for the run."""
3252
3368
 
3369
+ compute_key: Optional[str] = None
3370
+ """The key of the compute requirement, specified in `job.settings.compute`, to use for execution of
3371
+ this task."""
3372
+
3253
3373
  condition_task: Optional[RunConditionTask] = None
3254
3374
  """If condition_task, specifies a condition with an outcome that can be used to control the
3255
3375
  execution of other tasks. Does not require a cluster to execute and does not support retries or
@@ -3267,6 +3387,10 @@ class RunTask:
3267
3387
  description: Optional[str] = None
3268
3388
  """An optional description for this task."""
3269
3389
 
3390
+ email_notifications: Optional[JobEmailNotifications] = None
3391
+ """An optional set of email addresses notified when the task run begins or completes. The default
3392
+ behavior is to not send any emails."""
3393
+
3270
3394
  end_time: Optional[int] = None
3271
3395
  """The time at which this run ended in epoch milliseconds (milliseconds since 1/1/1970 UTC). This
3272
3396
  field is set to 0 if the job is still running."""
@@ -3279,9 +3403,9 @@ class RunTask:
3279
3403
  duration of a multitask job run is the value of the `run_duration` field."""
3280
3404
 
3281
3405
  existing_cluster_id: Optional[str] = None
3282
- """If existing_cluster_id, the ID of an existing cluster that is used for all runs of this job.
3283
- When running jobs on an existing cluster, you may need to manually restart the cluster if it
3284
- stops responding. We suggest running jobs on new clusters for greater reliability."""
3406
+ """If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running
3407
+ jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops
3408
+ responding. We suggest running jobs and tasks on new clusters for greater reliability"""
3285
3409
 
3286
3410
  for_each_task: Optional[RunForEachTask] = None
3287
3411
  """If for_each_task, indicates that this task must execute the nested task within it."""
@@ -3289,26 +3413,32 @@ class RunTask:
3289
3413
  git_source: Optional[GitSource] = None
3290
3414
  """An optional specification for a remote Git repository containing the source code used by tasks.
3291
3415
  Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks.
3292
-
3293
3416
  If `git_source` is set, these tasks retrieve the file from the remote repository by default.
3294
- However, this behavior can be overridden by setting `source` to `WORKSPACE` on the task.
3295
-
3296
- Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks
3297
- are used, `git_source` must be defined on the job."""
3417
+ However, this behavior can be overridden by setting `source` to `WORKSPACE` on the task. Note:
3418
+ dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are
3419
+ used, `git_source` must be defined on the job."""
3420
+
3421
+ job_cluster_key: Optional[str] = None
3422
+ """If job_cluster_key, this task is executed reusing the cluster specified in
3423
+ `job.settings.job_clusters`."""
3298
3424
 
3299
3425
  libraries: Optional[List[compute.Library]] = None
3300
- """An optional list of libraries to be installed on the cluster that executes the job. The default
3301
- value is an empty list."""
3426
+ """An optional list of libraries to be installed on the cluster. The default value is an empty
3427
+ list."""
3302
3428
 
3303
3429
  new_cluster: Optional[compute.ClusterSpec] = None
3304
- """If new_cluster, a description of a new cluster that is created only for this task."""
3430
+ """If new_cluster, a description of a new cluster that is created for each run."""
3305
3431
 
3306
3432
  notebook_task: Optional[NotebookTask] = None
3307
- """If notebook_task, indicates that this job must run a notebook. This field may not be specified
3433
+ """If notebook_task, indicates that this task must run a notebook. This field may not be specified
3308
3434
  in conjunction with spark_jar_task."""
3309
3435
 
3436
+ notification_settings: Optional[TaskNotificationSettings] = None
3437
+ """Optional notification settings that are used when sending notifications to each of the
3438
+ `email_notifications` and `webhook_notifications` for this task run."""
3439
+
3310
3440
  pipeline_task: Optional[PipelineTask] = None
3311
- """If pipeline_task, indicates that this job must execute a Pipeline."""
3441
+ """If pipeline_task, indicates that this task must execute a Pipeline."""
3312
3442
 
3313
3443
  python_wheel_task: Optional[PythonWheelTask] = None
3314
3444
  """If python_wheel_task, indicates that this job must execute a PythonWheel."""
@@ -3319,6 +3449,9 @@ class RunTask:
3319
3449
  resolved_values: Optional[ResolvedValues] = None
3320
3450
  """Parameter values including resolved references"""
3321
3451
 
3452
+ run_duration: Optional[int] = None
3453
+ """The time in milliseconds it took the job run and all of its repairs to finish."""
3454
+
3322
3455
  run_id: Optional[int] = None
3323
3456
  """The ID of the task run."""
3324
3457
 
@@ -3330,6 +3463,8 @@ class RunTask:
3330
3463
  run_job_task: Optional[RunJobTask] = None
3331
3464
  """If run_job_task, indicates that this task must execute another job."""
3332
3465
 
3466
+ run_page_url: Optional[str] = None
3467
+
3333
3468
  setup_duration: Optional[int] = None
3334
3469
  """The time in milliseconds it took to set up the cluster. For runs that run on new clusters this
3335
3470
  is the cluster creation time, for runs that run on existing clusters this time should be very
@@ -3338,10 +3473,10 @@ class RunTask:
3338
3473
  duration of a multitask job run is the value of the `run_duration` field."""
3339
3474
 
3340
3475
  spark_jar_task: Optional[SparkJarTask] = None
3341
- """If spark_jar_task, indicates that this job must run a JAR."""
3476
+ """If spark_jar_task, indicates that this task must run a JAR."""
3342
3477
 
3343
3478
  spark_python_task: Optional[SparkPythonTask] = None
3344
- """If spark_python_task, indicates that this job must run a Python file."""
3479
+ """If spark_python_task, indicates that this task must run a Python file."""
3345
3480
 
3346
3481
  spark_submit_task: Optional[SparkSubmitTask] = None
3347
3482
  """If `spark_submit_task`, indicates that this task must be launched by the spark submit script.
@@ -3361,7 +3496,7 @@ class RunTask:
3361
3496
  The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 paths."""
3362
3497
 
3363
3498
  sql_task: Optional[SqlTask] = None
3364
- """If sql_task, indicates that this job must execute a SQL."""
3499
+ """If sql_task, indicates that this job must execute a SQL task."""
3365
3500
 
3366
3501
  start_time: Optional[int] = None
3367
3502
  """The time at which this run was started in epoch milliseconds (milliseconds since 1/1/1970 UTC).
@@ -3371,10 +3506,13 @@ class RunTask:
3371
3506
  state: Optional[RunState] = None
3372
3507
  """The current state of the run."""
3373
3508
 
3374
- task_key: Optional[str] = None
3375
- """A unique name for the task. This field is used to refer to this task from other tasks. This
3376
- field is required and must be unique within its parent job. On Update or Reset, this field is
3377
- used to reference the tasks to be updated or reset."""
3509
+ timeout_seconds: Optional[int] = None
3510
+ """An optional timeout applied to each run of this job task. A value of `0` means no timeout."""
3511
+
3512
+ webhook_notifications: Optional[WebhookNotifications] = None
3513
+ """A collection of system notification IDs to notify when the run begins or completes. The default
3514
+ behavior is to not send any system notifications. Task webhooks respect the task notification
3515
+ settings."""
3378
3516
 
3379
3517
  def as_dict(self) -> dict:
3380
3518
  """Serializes the RunTask into a dictionary suitable for use as a JSON request body."""
@@ -3382,25 +3520,31 @@ class RunTask:
3382
3520
  if self.attempt_number is not None: body['attempt_number'] = self.attempt_number
3383
3521
  if self.cleanup_duration is not None: body['cleanup_duration'] = self.cleanup_duration
3384
3522
  if self.cluster_instance: body['cluster_instance'] = self.cluster_instance.as_dict()
3523
+ if self.compute_key is not None: body['compute_key'] = self.compute_key
3385
3524
  if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
3386
3525
  if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
3387
3526
  if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
3388
3527
  if self.description is not None: body['description'] = self.description
3528
+ if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
3389
3529
  if self.end_time is not None: body['end_time'] = self.end_time
3390
3530
  if self.execution_duration is not None: body['execution_duration'] = self.execution_duration
3391
3531
  if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
3392
3532
  if self.for_each_task: body['for_each_task'] = self.for_each_task.as_dict()
3393
3533
  if self.git_source: body['git_source'] = self.git_source.as_dict()
3534
+ if self.job_cluster_key is not None: body['job_cluster_key'] = self.job_cluster_key
3394
3535
  if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
3395
3536
  if self.new_cluster: body['new_cluster'] = self.new_cluster.as_dict()
3396
3537
  if self.notebook_task: body['notebook_task'] = self.notebook_task.as_dict()
3538
+ if self.notification_settings: body['notification_settings'] = self.notification_settings.as_dict()
3397
3539
  if self.pipeline_task: body['pipeline_task'] = self.pipeline_task.as_dict()
3398
3540
  if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task.as_dict()
3399
3541
  if self.queue_duration is not None: body['queue_duration'] = self.queue_duration
3400
3542
  if self.resolved_values: body['resolved_values'] = self.resolved_values.as_dict()
3543
+ if self.run_duration is not None: body['run_duration'] = self.run_duration
3401
3544
  if self.run_id is not None: body['run_id'] = self.run_id
3402
3545
  if self.run_if is not None: body['run_if'] = self.run_if.value
3403
3546
  if self.run_job_task: body['run_job_task'] = self.run_job_task.as_dict()
3547
+ if self.run_page_url is not None: body['run_page_url'] = self.run_page_url
3404
3548
  if self.setup_duration is not None: body['setup_duration'] = self.setup_duration
3405
3549
  if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task.as_dict()
3406
3550
  if self.spark_python_task: body['spark_python_task'] = self.spark_python_task.as_dict()
@@ -3409,6 +3553,8 @@ class RunTask:
3409
3553
  if self.start_time is not None: body['start_time'] = self.start_time
3410
3554
  if self.state: body['state'] = self.state.as_dict()
3411
3555
  if self.task_key is not None: body['task_key'] = self.task_key
3556
+ if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
3557
+ if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
3412
3558
  return body
3413
3559
 
3414
3560
  @classmethod
@@ -3417,25 +3563,31 @@ class RunTask:
3417
3563
  return cls(attempt_number=d.get('attempt_number', None),
3418
3564
  cleanup_duration=d.get('cleanup_duration', None),
3419
3565
  cluster_instance=_from_dict(d, 'cluster_instance', ClusterInstance),
3566
+ compute_key=d.get('compute_key', None),
3420
3567
  condition_task=_from_dict(d, 'condition_task', RunConditionTask),
3421
3568
  dbt_task=_from_dict(d, 'dbt_task', DbtTask),
3422
3569
  depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
3423
3570
  description=d.get('description', None),
3571
+ email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
3424
3572
  end_time=d.get('end_time', None),
3425
3573
  execution_duration=d.get('execution_duration', None),
3426
3574
  existing_cluster_id=d.get('existing_cluster_id', None),
3427
3575
  for_each_task=_from_dict(d, 'for_each_task', RunForEachTask),
3428
3576
  git_source=_from_dict(d, 'git_source', GitSource),
3577
+ job_cluster_key=d.get('job_cluster_key', None),
3429
3578
  libraries=_repeated_dict(d, 'libraries', compute.Library),
3430
3579
  new_cluster=_from_dict(d, 'new_cluster', compute.ClusterSpec),
3431
3580
  notebook_task=_from_dict(d, 'notebook_task', NotebookTask),
3581
+ notification_settings=_from_dict(d, 'notification_settings', TaskNotificationSettings),
3432
3582
  pipeline_task=_from_dict(d, 'pipeline_task', PipelineTask),
3433
3583
  python_wheel_task=_from_dict(d, 'python_wheel_task', PythonWheelTask),
3434
3584
  queue_duration=d.get('queue_duration', None),
3435
3585
  resolved_values=_from_dict(d, 'resolved_values', ResolvedValues),
3586
+ run_duration=d.get('run_duration', None),
3436
3587
  run_id=d.get('run_id', None),
3437
3588
  run_if=_enum(d, 'run_if', RunIf),
3438
3589
  run_job_task=_from_dict(d, 'run_job_task', RunJobTask),
3590
+ run_page_url=d.get('run_page_url', None),
3439
3591
  setup_duration=d.get('setup_duration', None),
3440
3592
  spark_jar_task=_from_dict(d, 'spark_jar_task', SparkJarTask),
3441
3593
  spark_python_task=_from_dict(d, 'spark_python_task', SparkPythonTask),
@@ -3443,13 +3595,15 @@ class RunTask:
3443
3595
  sql_task=_from_dict(d, 'sql_task', SqlTask),
3444
3596
  start_time=d.get('start_time', None),
3445
3597
  state=_from_dict(d, 'state', RunState),
3446
- task_key=d.get('task_key', None))
3598
+ task_key=d.get('task_key', None),
3599
+ timeout_seconds=d.get('timeout_seconds', None),
3600
+ webhook_notifications=_from_dict(d, 'webhook_notifications', WebhookNotifications))
3447
3601
 
3448
3602
 
3449
3603
  class RunType(Enum):
3450
- """* `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow
3451
- run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with
3452
- :method:jobs/submit.
3604
+ """The type of a run. * `JOB_RUN`: Normal job run. A run created with :method:jobs/runNow. *
3605
+ `WORKFLOW_RUN`: Workflow run. A run created with [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit
3606
+ run. A run created with :method:jobs/submit.
3453
3607
 
3454
3608
  [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow"""
3455
3609
 
@@ -3459,6 +3613,13 @@ class RunType(Enum):
3459
3613
 
3460
3614
 
3461
3615
  class Source(Enum):
3616
+ """Optional location type of the SQL file. When set to `WORKSPACE`, the SQL file will be retrieved\
3617
+ from the local Databricks workspace. When set to `GIT`, the SQL file will be retrieved from a
3618
+ Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if
3619
+ `git_source` is defined and `WORKSPACE` otherwise.
3620
+
3621
+ * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL file is located in
3622
+ cloud Git provider."""
3462
3623
 
3463
3624
  GIT = 'GIT'
3464
3625
  WORKSPACE = 'WORKSPACE'
@@ -3480,9 +3641,9 @@ class SparkJarTask:
3480
3641
  parameters: Optional[List[str]] = None
3481
3642
  """Parameters passed to the main method.
3482
3643
 
3483
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3644
+ Use [Task parameter variables] to set parameters containing information about job runs.
3484
3645
 
3485
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3646
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
3486
3647
 
3487
3648
  def as_dict(self) -> dict:
3488
3649
  """Serializes the SparkJarTask into a dictionary suitable for use as a JSON request body."""
@@ -3511,17 +3672,17 @@ class SparkPythonTask:
3511
3672
  parameters: Optional[List[str]] = None
3512
3673
  """Command line parameters passed to the Python file.
3513
3674
 
3514
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3675
+ Use [Task parameter variables] to set parameters containing information about job runs.
3515
3676
 
3516
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3677
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
3517
3678
 
3518
3679
  source: Optional[Source] = None
3519
3680
  """Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file
3520
- will be retrieved from the local <Databricks> workspace or cloud location (if the `python_file`
3681
+ will be retrieved from the local Databricks workspace or cloud location (if the `python_file`
3521
3682
  has a URI format). When set to `GIT`, the Python file will be retrieved from a Git repository
3522
3683
  defined in `git_source`.
3523
3684
 
3524
- * `WORKSPACE`: The Python file is located in a <Databricks> workspace or at a cloud filesystem
3685
+ * `WORKSPACE`: The Python file is located in a Databricks workspace or at a cloud filesystem
3525
3686
  URI. * `GIT`: The Python file is located in a remote Git repository."""
3526
3687
 
3527
3688
  def as_dict(self) -> dict:
@@ -3545,9 +3706,9 @@ class SparkSubmitTask:
3545
3706
  parameters: Optional[List[str]] = None
3546
3707
  """Command-line parameters passed to spark submit.
3547
3708
 
3548
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
3709
+ Use [Task parameter variables] to set parameters containing information about job runs.
3549
3710
 
3550
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html"""
3711
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables"""
3551
3712
 
3552
3713
  def as_dict(self) -> dict:
3553
3714
  """Serializes the SparkSubmitTask into a dictionary suitable for use as a JSON request body."""
@@ -3683,7 +3844,6 @@ class SqlDashboardWidgetOutput:
3683
3844
 
3684
3845
 
3685
3846
  class SqlDashboardWidgetOutputStatus(Enum):
3686
- """The execution status of the SQL widget."""
3687
3847
 
3688
3848
  CANCELLED = 'CANCELLED'
3689
3849
  FAILED = 'FAILED'
@@ -3738,6 +3898,8 @@ class SqlOutputError:
3738
3898
 
3739
3899
  @dataclass
3740
3900
  class SqlQueryOutput:
3901
+ endpoint_id: Optional[str] = None
3902
+
3741
3903
  output_link: Optional[str] = None
3742
3904
  """The link to find the output results."""
3743
3905
 
@@ -3753,6 +3915,7 @@ class SqlQueryOutput:
3753
3915
  def as_dict(self) -> dict:
3754
3916
  """Serializes the SqlQueryOutput into a dictionary suitable for use as a JSON request body."""
3755
3917
  body = {}
3918
+ if self.endpoint_id is not None: body['endpoint_id'] = self.endpoint_id
3756
3919
  if self.output_link is not None: body['output_link'] = self.output_link
3757
3920
  if self.query_text is not None: body['query_text'] = self.query_text
3758
3921
  if self.sql_statements: body['sql_statements'] = [v.as_dict() for v in self.sql_statements]
@@ -3762,7 +3925,8 @@ class SqlQueryOutput:
3762
3925
  @classmethod
3763
3926
  def from_dict(cls, d: Dict[str, any]) -> SqlQueryOutput:
3764
3927
  """Deserializes the SqlQueryOutput from a dictionary."""
3765
- return cls(output_link=d.get('output_link', None),
3928
+ return cls(endpoint_id=d.get('endpoint_id', None),
3929
+ output_link=d.get('output_link', None),
3766
3930
  query_text=d.get('query_text', None),
3767
3931
  sql_statements=_repeated_dict(d, 'sql_statements', SqlStatementOutput),
3768
3932
  warehouse_id=d.get('warehouse_id', None))
@@ -3899,11 +4063,11 @@ class SqlTaskFile:
3899
4063
 
3900
4064
  source: Optional[Source] = None
3901
4065
  """Optional location type of the SQL file. When set to `WORKSPACE`, the SQL file will be retrieved
3902
- from the local <Databricks> workspace. When set to `GIT`, the SQL file will be retrieved from a
4066
+ from the local Databricks workspace. When set to `GIT`, the SQL file will be retrieved from a
3903
4067
  Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if
3904
4068
  `git_source` is defined and `WORKSPACE` otherwise.
3905
4069
 
3906
- * `WORKSPACE`: SQL file is located in <Databricks> workspace. * `GIT`: SQL file is located in
4070
+ * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL file is located in
3907
4071
  cloud Git provider."""
3908
4072
 
3909
4073
  def as_dict(self) -> dict:
@@ -3965,6 +4129,15 @@ class SubmitRun:
3965
4129
  access_control_list: Optional[List[iam.AccessControlRequest]] = None
3966
4130
  """List of permissions to set on the job."""
3967
4131
 
4132
+ condition_task: Optional[ConditionTask] = None
4133
+ """If condition_task, specifies a condition with an outcome that can be used to control the
4134
+ execution of other tasks. Does not require a cluster to execute and does not support retries or
4135
+ notifications."""
4136
+
4137
+ dbt_task: Optional[DbtTask] = None
4138
+ """If dbt_task, indicates that this must execute a dbt task. It requires both Databricks SQL and
4139
+ the ability to use a serverless or a pro SQL warehouse."""
4140
+
3968
4141
  email_notifications: Optional[JobEmailNotifications] = None
3969
4142
  """An optional set of email addresses notified when the run begins or completes."""
3970
4143
 
@@ -3995,16 +4168,55 @@ class SubmitRun:
3995
4168
 
3996
4169
  [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html"""
3997
4170
 
4171
+ notebook_task: Optional[NotebookTask] = None
4172
+ """If notebook_task, indicates that this task must run a notebook. This field may not be specified
4173
+ in conjunction with spark_jar_task."""
4174
+
3998
4175
  notification_settings: Optional[JobNotificationSettings] = None
3999
4176
  """Optional notification settings that are used when sending notifications to each of the
4000
4177
  `email_notifications` and `webhook_notifications` for this run."""
4001
4178
 
4179
+ pipeline_task: Optional[PipelineTask] = None
4180
+ """If pipeline_task, indicates that this task must execute a Pipeline."""
4181
+
4182
+ python_wheel_task: Optional[PythonWheelTask] = None
4183
+ """If python_wheel_task, indicates that this job must execute a PythonWheel."""
4184
+
4002
4185
  queue: Optional[QueueSettings] = None
4003
4186
  """The queue settings of the one-time run."""
4004
4187
 
4188
+ run_job_task: Optional[RunJobTask] = None
4189
+ """If run_job_task, indicates that this task must execute another job."""
4190
+
4005
4191
  run_name: Optional[str] = None
4006
4192
  """An optional name for the run. The default value is `Untitled`."""
4007
4193
 
4194
+ spark_jar_task: Optional[SparkJarTask] = None
4195
+ """If spark_jar_task, indicates that this task must run a JAR."""
4196
+
4197
+ spark_python_task: Optional[SparkPythonTask] = None
4198
+ """If spark_python_task, indicates that this task must run a Python file."""
4199
+
4200
+ spark_submit_task: Optional[SparkSubmitTask] = None
4201
+ """If `spark_submit_task`, indicates that this task must be launched by the spark submit script.
4202
+ This task can run only on new clusters.
4203
+
4204
+ In the `new_cluster` specification, `libraries` and `spark_conf` are not supported. Instead, use
4205
+ `--jars` and `--py-files` to add Java and Python libraries and `--conf` to set the Spark
4206
+ configurations.
4207
+
4208
+ `master`, `deploy-mode`, and `executor-cores` are automatically configured by Databricks; you
4209
+ _cannot_ specify them in parameters.
4210
+
4211
+ By default, the Spark submit job uses all available memory (excluding reserved memory for
4212
+ Databricks services). You can set `--driver-memory`, and `--executor-memory` to a smaller value
4213
+ to leave some room for off-heap usage.
4214
+
4215
+ The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 paths."""
4216
+
4217
+ sql_task: Optional[SqlTask] = None
4218
+ """If sql_task, indicates that this job must execute a SQL task."""
4219
+
4008
4220
  tasks: Optional[List[SubmitTask]] = None
4009
4221
 
4010
4222
  timeout_seconds: Optional[int] = None
@@ -4018,13 +4230,23 @@ class SubmitRun:
4018
4230
  body = {}
4019
4231
  if self.access_control_list:
4020
4232
  body['access_control_list'] = [v.as_dict() for v in self.access_control_list]
4233
+ if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
4234
+ if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
4021
4235
  if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
4022
4236
  if self.git_source: body['git_source'] = self.git_source.as_dict()
4023
4237
  if self.health: body['health'] = self.health.as_dict()
4024
4238
  if self.idempotency_token is not None: body['idempotency_token'] = self.idempotency_token
4239
+ if self.notebook_task: body['notebook_task'] = self.notebook_task.as_dict()
4025
4240
  if self.notification_settings: body['notification_settings'] = self.notification_settings.as_dict()
4241
+ if self.pipeline_task: body['pipeline_task'] = self.pipeline_task.as_dict()
4242
+ if self.python_wheel_task: body['python_wheel_task'] = self.python_wheel_task.as_dict()
4026
4243
  if self.queue: body['queue'] = self.queue.as_dict()
4244
+ if self.run_job_task: body['run_job_task'] = self.run_job_task.as_dict()
4027
4245
  if self.run_name is not None: body['run_name'] = self.run_name
4246
+ if self.spark_jar_task: body['spark_jar_task'] = self.spark_jar_task.as_dict()
4247
+ if self.spark_python_task: body['spark_python_task'] = self.spark_python_task.as_dict()
4248
+ if self.spark_submit_task: body['spark_submit_task'] = self.spark_submit_task.as_dict()
4249
+ if self.sql_task: body['sql_task'] = self.sql_task.as_dict()
4028
4250
  if self.tasks: body['tasks'] = [v.as_dict() for v in self.tasks]
4029
4251
  if self.timeout_seconds is not None: body['timeout_seconds'] = self.timeout_seconds
4030
4252
  if self.webhook_notifications: body['webhook_notifications'] = self.webhook_notifications.as_dict()
@@ -4034,13 +4256,23 @@ class SubmitRun:
4034
4256
  def from_dict(cls, d: Dict[str, any]) -> SubmitRun:
4035
4257
  """Deserializes the SubmitRun from a dictionary."""
4036
4258
  return cls(access_control_list=_repeated_dict(d, 'access_control_list', iam.AccessControlRequest),
4259
+ condition_task=_from_dict(d, 'condition_task', ConditionTask),
4260
+ dbt_task=_from_dict(d, 'dbt_task', DbtTask),
4037
4261
  email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
4038
4262
  git_source=_from_dict(d, 'git_source', GitSource),
4039
4263
  health=_from_dict(d, 'health', JobsHealthRules),
4040
4264
  idempotency_token=d.get('idempotency_token', None),
4265
+ notebook_task=_from_dict(d, 'notebook_task', NotebookTask),
4041
4266
  notification_settings=_from_dict(d, 'notification_settings', JobNotificationSettings),
4267
+ pipeline_task=_from_dict(d, 'pipeline_task', PipelineTask),
4268
+ python_wheel_task=_from_dict(d, 'python_wheel_task', PythonWheelTask),
4042
4269
  queue=_from_dict(d, 'queue', QueueSettings),
4270
+ run_job_task=_from_dict(d, 'run_job_task', RunJobTask),
4043
4271
  run_name=d.get('run_name', None),
4272
+ spark_jar_task=_from_dict(d, 'spark_jar_task', SparkJarTask),
4273
+ spark_python_task=_from_dict(d, 'spark_python_task', SparkPythonTask),
4274
+ spark_submit_task=_from_dict(d, 'spark_submit_task', SparkSubmitTask),
4275
+ sql_task=_from_dict(d, 'sql_task', SqlTask),
4044
4276
  tasks=_repeated_dict(d, 'tasks', SubmitTask),
4045
4277
  timeout_seconds=d.get('timeout_seconds', None),
4046
4278
  webhook_notifications=_from_dict(d, 'webhook_notifications', WebhookNotifications))
@@ -4048,6 +4280,8 @@ class SubmitRun:
4048
4280
 
4049
4281
  @dataclass
4050
4282
  class SubmitRunResponse:
4283
+ """Run was created and started successfully."""
4284
+
4051
4285
  run_id: Optional[int] = None
4052
4286
  """The canonical identifier for the newly submitted run."""
4053
4287
 
@@ -4080,29 +4314,30 @@ class SubmitTask:
4080
4314
  this field must complete successfully before executing this task. The key is `task_key`, and the
4081
4315
  value is the name assigned to the dependent task."""
4082
4316
 
4317
+ description: Optional[str] = None
4318
+ """An optional description for this task."""
4319
+
4083
4320
  email_notifications: Optional[JobEmailNotifications] = None
4084
4321
  """An optional set of email addresses notified when the task run begins or completes. The default
4085
4322
  behavior is to not send any emails."""
4086
4323
 
4087
4324
  existing_cluster_id: Optional[str] = None
4088
- """If existing_cluster_id, the ID of an existing cluster that is used for all runs of this task.
4089
- Only all-purpose clusters are supported. When running tasks on an existing cluster, you may need
4090
- to manually restart the cluster if it stops responding. We suggest running jobs on new clusters
4091
- for greater reliability."""
4325
+ """If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running
4326
+ jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops
4327
+ responding. We suggest running jobs and tasks on new clusters for greater reliability"""
4092
4328
 
4093
4329
  for_each_task: Optional[ForEachTask] = None
4094
- """If for_each_task, indicates that this must execute the nested task within it for the inputs
4095
- provided."""
4330
+ """If for_each_task, indicates that this task must execute the nested task within it."""
4096
4331
 
4097
4332
  health: Optional[JobsHealthRules] = None
4098
4333
  """An optional set of health rules that can be defined for this job."""
4099
4334
 
4100
4335
  libraries: Optional[List[compute.Library]] = None
4101
- """An optional list of libraries to be installed on the cluster that executes the task. The default
4102
- value is an empty list."""
4336
+ """An optional list of libraries to be installed on the cluster. The default value is an empty
4337
+ list."""
4103
4338
 
4104
4339
  new_cluster: Optional[compute.ClusterSpec] = None
4105
- """If new_cluster, a description of a cluster that is created for each run."""
4340
+ """If new_cluster, a description of a new cluster that is created for each run."""
4106
4341
 
4107
4342
  notebook_task: Optional[NotebookTask] = None
4108
4343
  """If notebook_task, indicates that this task must run a notebook. This field may not be specified
@@ -4124,7 +4359,7 @@ class SubmitTask:
4124
4359
  :method:jobs/create for a list of possible values."""
4125
4360
 
4126
4361
  run_job_task: Optional[RunJobTask] = None
4127
- """If run_job_task, indicates that this job must execute another job."""
4362
+ """If run_job_task, indicates that this task must execute another job."""
4128
4363
 
4129
4364
  spark_jar_task: Optional[SparkJarTask] = None
4130
4365
  """If spark_jar_task, indicates that this task must run a JAR."""
@@ -4150,7 +4385,7 @@ class SubmitTask:
4150
4385
  The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 paths."""
4151
4386
 
4152
4387
  sql_task: Optional[SqlTask] = None
4153
- """If sql_task, indicates that this job must execute a SQL."""
4388
+ """If sql_task, indicates that this job must execute a SQL task."""
4154
4389
 
4155
4390
  timeout_seconds: Optional[int] = None
4156
4391
  """An optional timeout applied to each run of this job task. A value of `0` means no timeout."""
@@ -4165,6 +4400,7 @@ class SubmitTask:
4165
4400
  body = {}
4166
4401
  if self.condition_task: body['condition_task'] = self.condition_task.as_dict()
4167
4402
  if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
4403
+ if self.description is not None: body['description'] = self.description
4168
4404
  if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
4169
4405
  if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
4170
4406
  if self.for_each_task: body['for_each_task'] = self.for_each_task.as_dict()
@@ -4191,6 +4427,7 @@ class SubmitTask:
4191
4427
  """Deserializes the SubmitTask from a dictionary."""
4192
4428
  return cls(condition_task=_from_dict(d, 'condition_task', ConditionTask),
4193
4429
  depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
4430
+ description=d.get('description', None),
4194
4431
  email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
4195
4432
  existing_cluster_id=d.get('existing_cluster_id', None),
4196
4433
  for_each_task=_from_dict(d, 'for_each_task', ForEachTask),
@@ -4279,19 +4516,20 @@ class Task:
4279
4516
  description: Optional[str] = None
4280
4517
  """An optional description for this task."""
4281
4518
 
4519
+ disable_auto_optimization: Optional[bool] = None
4520
+ """An option to disable auto optimization in serverless"""
4521
+
4282
4522
  email_notifications: Optional[TaskEmailNotifications] = None
4283
4523
  """An optional set of email addresses that is notified when runs of this task begin or complete as
4284
4524
  well as when this task is deleted. The default behavior is to not send any emails."""
4285
4525
 
4286
4526
  existing_cluster_id: Optional[str] = None
4287
- """If existing_cluster_id, the ID of an existing cluster that is used for all runs of this task.
4288
- Only all-purpose clusters are supported. When running tasks on an existing cluster, you may need
4289
- to manually restart the cluster if it stops responding. We suggest running jobs on new clusters
4290
- for greater reliability."""
4527
+ """If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running
4528
+ jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops
4529
+ responding. We suggest running jobs and tasks on new clusters for greater reliability"""
4291
4530
 
4292
4531
  for_each_task: Optional[ForEachTask] = None
4293
- """If for_each_task, indicates that this must execute the nested task within it for the inputs
4294
- provided."""
4532
+ """If for_each_task, indicates that this task must execute the nested task within it."""
4295
4533
 
4296
4534
  health: Optional[JobsHealthRules] = None
4297
4535
  """An optional set of health rules that can be defined for this job."""
@@ -4301,8 +4539,8 @@ class Task:
4301
4539
  `job.settings.job_clusters`."""
4302
4540
 
4303
4541
  libraries: Optional[List[compute.Library]] = None
4304
- """An optional list of libraries to be installed on the cluster that executes the task. The default
4305
- value is an empty list."""
4542
+ """An optional list of libraries to be installed on the cluster. The default value is an empty
4543
+ list."""
4306
4544
 
4307
4545
  max_retries: Optional[int] = None
4308
4546
  """An optional maximum number of times to retry an unsuccessful run. A run is considered to be
@@ -4315,7 +4553,7 @@ class Task:
4315
4553
  subsequent retry run. The default behavior is that unsuccessful runs are immediately retried."""
4316
4554
 
4317
4555
  new_cluster: Optional[compute.ClusterSpec] = None
4318
- """If new_cluster, a description of a cluster that is created for only for this task."""
4556
+ """If new_cluster, a description of a new cluster that is created for each run."""
4319
4557
 
4320
4558
  notebook_task: Optional[NotebookTask] = None
4321
4559
  """If notebook_task, indicates that this task must run a notebook. This field may not be specified
@@ -4332,7 +4570,8 @@ class Task:
4332
4570
  """If python_wheel_task, indicates that this job must execute a PythonWheel."""
4333
4571
 
4334
4572
  retry_on_timeout: Optional[bool] = None
4335
- """An optional policy to specify whether to retry a task when it times out."""
4573
+ """An optional policy to specify whether to retry a job when it times out. The default behavior is
4574
+ to not retry on timeout."""
4336
4575
 
4337
4576
  run_if: Optional[RunIf] = None
4338
4577
  """An optional value specifying the condition determining whether the task is run once its
@@ -4387,6 +4626,8 @@ class Task:
4387
4626
  if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
4388
4627
  if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
4389
4628
  if self.description is not None: body['description'] = self.description
4629
+ if self.disable_auto_optimization is not None:
4630
+ body['disable_auto_optimization'] = self.disable_auto_optimization
4390
4631
  if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
4391
4632
  if self.existing_cluster_id is not None: body['existing_cluster_id'] = self.existing_cluster_id
4392
4633
  if self.for_each_task: body['for_each_task'] = self.for_each_task.as_dict()
@@ -4421,6 +4662,7 @@ class Task:
4421
4662
  dbt_task=_from_dict(d, 'dbt_task', DbtTask),
4422
4663
  depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
4423
4664
  description=d.get('description', None),
4665
+ disable_auto_optimization=d.get('disable_auto_optimization', None),
4424
4666
  email_notifications=_from_dict(d, 'email_notifications', TaskEmailNotifications),
4425
4667
  existing_cluster_id=d.get('existing_cluster_id', None),
4426
4668
  for_each_task=_from_dict(d, 'for_each_task', ForEachTask),
@@ -4470,6 +4712,9 @@ class TaskDependency:
4470
4712
 
4471
4713
  @dataclass
4472
4714
  class TaskEmailNotifications:
4715
+ no_alert_for_skipped_runs: Optional[bool] = None
4716
+ """If true, do not send email to recipients specified in `on_failure` if the run is skipped."""
4717
+
4473
4718
  on_duration_warning_threshold_exceeded: Optional[List[str]] = None
4474
4719
  """A list of email addresses to be notified when the duration of a run exceeds the threshold
4475
4720
  specified for the `RUN_DURATION_SECONDS` metric in the `health` field. If no rule for the
@@ -4495,6 +4740,8 @@ class TaskEmailNotifications:
4495
4740
  def as_dict(self) -> dict:
4496
4741
  """Serializes the TaskEmailNotifications into a dictionary suitable for use as a JSON request body."""
4497
4742
  body = {}
4743
+ if self.no_alert_for_skipped_runs is not None:
4744
+ body['no_alert_for_skipped_runs'] = self.no_alert_for_skipped_runs
4498
4745
  if self.on_duration_warning_threshold_exceeded:
4499
4746
  body['on_duration_warning_threshold_exceeded'] = [
4500
4747
  v for v in self.on_duration_warning_threshold_exceeded
@@ -4507,7 +4754,8 @@ class TaskEmailNotifications:
4507
4754
  @classmethod
4508
4755
  def from_dict(cls, d: Dict[str, any]) -> TaskEmailNotifications:
4509
4756
  """Deserializes the TaskEmailNotifications from a dictionary."""
4510
- return cls(on_duration_warning_threshold_exceeded=d.get('on_duration_warning_threshold_exceeded',
4757
+ return cls(no_alert_for_skipped_runs=d.get('no_alert_for_skipped_runs', None),
4758
+ on_duration_warning_threshold_exceeded=d.get('on_duration_warning_threshold_exceeded',
4511
4759
  None),
4512
4760
  on_failure=d.get('on_failure', None),
4513
4761
  on_start=d.get('on_start', None),
@@ -4549,6 +4797,8 @@ class TaskNotificationSettings:
4549
4797
 
4550
4798
  @dataclass
4551
4799
  class TriggerInfo:
4800
+ """Additional details about what triggered the run"""
4801
+
4552
4802
  run_id: Optional[int] = None
4553
4803
  """The run id of the Run Job task run"""
4554
4804
 
@@ -4573,7 +4823,9 @@ class TriggerSettings:
4573
4823
  """Whether this trigger is paused or not."""
4574
4824
 
4575
4825
  table: Optional[TableTriggerConfiguration] = None
4576
- """Table trigger settings."""
4826
+ """Old table trigger settings name. Deprecated in favor of `table_update`."""
4827
+
4828
+ table_update: Optional[TableTriggerConfiguration] = None
4577
4829
 
4578
4830
  def as_dict(self) -> dict:
4579
4831
  """Serializes the TriggerSettings into a dictionary suitable for use as a JSON request body."""
@@ -4581,6 +4833,7 @@ class TriggerSettings:
4581
4833
  if self.file_arrival: body['file_arrival'] = self.file_arrival.as_dict()
4582
4834
  if self.pause_status is not None: body['pause_status'] = self.pause_status.value
4583
4835
  if self.table: body['table'] = self.table.as_dict()
4836
+ if self.table_update: body['table_update'] = self.table_update.as_dict()
4584
4837
  return body
4585
4838
 
4586
4839
  @classmethod
@@ -4588,7 +4841,8 @@ class TriggerSettings:
4588
4841
  """Deserializes the TriggerSettings from a dictionary."""
4589
4842
  return cls(file_arrival=_from_dict(d, 'file_arrival', FileArrivalTriggerConfiguration),
4590
4843
  pause_status=_enum(d, 'pause_status', PauseStatus),
4591
- table=_from_dict(d, 'table', TableTriggerConfiguration))
4844
+ table=_from_dict(d, 'table', TableTriggerConfiguration),
4845
+ table_update=_from_dict(d, 'table_update', TableTriggerConfiguration))
4592
4846
 
4593
4847
 
4594
4848
  class TriggerType(Enum):
@@ -4705,7 +4959,7 @@ class ViewsToExport(Enum):
4705
4959
 
4706
4960
  @dataclass
4707
4961
  class Webhook:
4708
- id: Optional[str] = None
4962
+ id: str
4709
4963
 
4710
4964
  def as_dict(self) -> dict:
4711
4965
  """Serializes the Webhook into a dictionary suitable for use as a JSON request body."""
@@ -4721,8 +4975,7 @@ class Webhook:
4721
4975
 
4722
4976
  @dataclass
4723
4977
  class WebhookNotifications:
4724
- on_duration_warning_threshold_exceeded: Optional[
4725
- List[WebhookNotificationsOnDurationWarningThresholdExceededItem]] = None
4978
+ on_duration_warning_threshold_exceeded: Optional[List[Webhook]] = None
4726
4979
  """An optional list of system notification IDs to call when the duration of a run exceeds the
4727
4980
  threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. A maximum of 3
4728
4981
  destinations can be specified for the `on_duration_warning_threshold_exceeded` property."""
@@ -4755,29 +5008,12 @@ class WebhookNotifications:
4755
5008
  def from_dict(cls, d: Dict[str, any]) -> WebhookNotifications:
4756
5009
  """Deserializes the WebhookNotifications from a dictionary."""
4757
5010
  return cls(on_duration_warning_threshold_exceeded=_repeated_dict(
4758
- d, 'on_duration_warning_threshold_exceeded',
4759
- WebhookNotificationsOnDurationWarningThresholdExceededItem),
5011
+ d, 'on_duration_warning_threshold_exceeded', Webhook),
4760
5012
  on_failure=_repeated_dict(d, 'on_failure', Webhook),
4761
5013
  on_start=_repeated_dict(d, 'on_start', Webhook),
4762
5014
  on_success=_repeated_dict(d, 'on_success', Webhook))
4763
5015
 
4764
5016
 
4765
- @dataclass
4766
- class WebhookNotificationsOnDurationWarningThresholdExceededItem:
4767
- id: Optional[str] = None
4768
-
4769
- def as_dict(self) -> dict:
4770
- """Serializes the WebhookNotificationsOnDurationWarningThresholdExceededItem into a dictionary suitable for use as a JSON request body."""
4771
- body = {}
4772
- if self.id is not None: body['id'] = self.id
4773
- return body
4774
-
4775
- @classmethod
4776
- def from_dict(cls, d: Dict[str, any]) -> WebhookNotificationsOnDurationWarningThresholdExceededItem:
4777
- """Deserializes the WebhookNotificationsOnDurationWarningThresholdExceededItem from a dictionary."""
4778
- return cls(id=d.get('id', None))
4779
-
4780
-
4781
5017
  class JobsAPI:
4782
5018
  """The Jobs API allows you to create, edit, and delete jobs.
4783
5019
 
@@ -4883,7 +5119,7 @@ class JobsAPI:
4883
5119
  continuous: Optional[Continuous] = None,
4884
5120
  deployment: Optional[JobDeployment] = None,
4885
5121
  description: Optional[str] = None,
4886
- edit_mode: Optional[CreateJobEditMode] = None,
5122
+ edit_mode: Optional[JobEditMode] = None,
4887
5123
  email_notifications: Optional[JobEmailNotifications] = None,
4888
5124
  format: Optional[Format] = None,
4889
5125
  git_source: Optional[GitSource] = None,
@@ -4916,7 +5152,7 @@ class JobsAPI:
4916
5152
  Deployment information for jobs managed by external sources.
4917
5153
  :param description: str (optional)
4918
5154
  An optional description for the job. The maximum length is 1024 characters in UTF-8 encoding.
4919
- :param edit_mode: :class:`CreateJobEditMode` (optional)
5155
+ :param edit_mode: :class:`JobEditMode` (optional)
4920
5156
  Edit mode of the job.
4921
5157
 
4922
5158
  * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is in
@@ -4942,18 +5178,14 @@ class JobsAPI:
4942
5178
  A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries
4943
5179
  cannot be declared in a shared job cluster. You must declare dependent libraries in task settings.
4944
5180
  :param max_concurrent_runs: int (optional)
4945
- An optional maximum allowed number of concurrent runs of the job.
4946
-
4947
- Set this value if you want to be able to execute multiple runs of the same job concurrently. This is
4948
- useful for example if you trigger your job on a frequent schedule and want to allow consecutive runs
4949
- to overlap with each other, or if you want to trigger multiple runs which differ by their input
4950
- parameters.
4951
-
4952
- This setting affects only new runs. For example, suppose the job’s concurrency is 4 and there are
4953
- 4 concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active runs.
4954
- However, from then on, new runs are skipped unless there are fewer than 3 active runs.
4955
-
4956
- This value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped.
5181
+ An optional maximum allowed number of concurrent runs of the job. Set this value if you want to be
5182
+ able to execute multiple runs of the same job concurrently. This is useful for example if you
5183
+ trigger your job on a frequent schedule and want to allow consecutive runs to overlap with each
5184
+ other, or if you want to trigger multiple runs which differ by their input parameters. This setting
5185
+ affects only new runs. For example, suppose the job’s concurrency is 4 and there are 4 concurrent
5186
+ active runs. Then setting the concurrency to 3 won’t kill any of the active runs. However, from
5187
+ then on, new runs are skipped unless there are fewer than 3 active runs. This value cannot exceed
5188
+ 1000. Setting this value to `0` causes all new runs to be skipped.
4957
5189
  :param name: str (optional)
4958
5190
  An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding.
4959
5191
  :param notification_settings: :class:`JobNotificationSettings` (optional)
@@ -5042,7 +5274,7 @@ class JobsAPI:
5042
5274
  Deletes a non-active run. Returns an error if the run is active.
5043
5275
 
5044
5276
  :param run_id: int
5045
- The canonical identifier of the run for which to retrieve the metadata.
5277
+ ID of the run to delete.
5046
5278
 
5047
5279
 
5048
5280
  """
@@ -5164,7 +5396,7 @@ class JobsAPI:
5164
5396
  reference them beyond 60 days, you must save old run results before they expire.
5165
5397
 
5166
5398
  :param run_id: int
5167
- The canonical identifier for the run. This field is required.
5399
+ The canonical identifier for the run.
5168
5400
 
5169
5401
  :returns: :class:`RunOutput`
5170
5402
  """
@@ -5195,9 +5427,8 @@ class JobsAPI:
5195
5427
  :param name: str (optional)
5196
5428
  A filter on the list based on the exact (case insensitive) job name.
5197
5429
  :param offset: int (optional)
5198
- The offset of the first job to return, relative to the most recently created job.
5199
-
5200
- Deprecated since June 2023. Use `page_token` to iterate through the pages instead.
5430
+ The offset of the first job to return, relative to the most recently created job. Deprecated since
5431
+ June 2023. Use `page_token` to iterate through the pages instead.
5201
5432
  :param page_token: str (optional)
5202
5433
  Use `next_page_token` or `prev_page_token` returned from the previous request to list the next or
5203
5434
  previous page of jobs respectively.
@@ -5231,7 +5462,7 @@ class JobsAPI:
5231
5462
  limit: Optional[int] = None,
5232
5463
  offset: Optional[int] = None,
5233
5464
  page_token: Optional[str] = None,
5234
- run_type: Optional[ListRunsRunType] = None,
5465
+ run_type: Optional[RunType] = None,
5235
5466
  start_time_from: Optional[int] = None,
5236
5467
  start_time_to: Optional[int] = None) -> Iterator[BaseRun]:
5237
5468
  """List job runs.
@@ -5253,13 +5484,12 @@ class JobsAPI:
5253
5484
  The number of runs to return. This value must be greater than 0 and less than 25. The default value
5254
5485
  is 20. If a request specifies a limit of 0, the service instead uses the maximum limit.
5255
5486
  :param offset: int (optional)
5256
- The offset of the first run to return, relative to the most recent run.
5257
-
5258
- Deprecated since June 2023. Use `page_token` to iterate through the pages instead.
5487
+ The offset of the first run to return, relative to the most recent run. Deprecated since June 2023.
5488
+ Use `page_token` to iterate through the pages instead.
5259
5489
  :param page_token: str (optional)
5260
5490
  Use `next_page_token` or `prev_page_token` returned from the previous request to list the next or
5261
5491
  previous page of runs respectively.
5262
- :param run_type: :class:`ListRunsRunType` (optional)
5492
+ :param run_type: :class:`RunType` (optional)
5263
5493
  The type of runs to return. For a description of run types, see :method:jobs/getRun.
5264
5494
  :param start_time_from: int (optional)
5265
5495
  Show runs that started _at or after_ this value. The value must be a UTC timestamp in milliseconds.
@@ -5318,7 +5548,7 @@ class JobsAPI:
5318
5548
  The job run ID of the run to repair. The run must not be in progress.
5319
5549
  :param dbt_commands: List[str] (optional)
5320
5550
  An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
5321
- deps", "dbt seed", "dbt run"]`
5551
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`
5322
5552
  :param jar_params: List[str] (optional)
5323
5553
  A list of parameters for jobs with Spark JAR tasks, for example `"jar_params": ["john doe", "35"]`.
5324
5554
  The parameters are used to invoke the main function of the main class specified in the Spark JAR
@@ -5326,9 +5556,8 @@ class JobsAPI:
5326
5556
  in conjunction with notebook_params. The JSON representation of this field (for example
5327
5557
  `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
5328
5558
 
5329
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5330
-
5331
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5559
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
5560
+ information about job runs.
5332
5561
  :param job_parameters: Dict[str,str] (optional)
5333
5562
  Job-level parameters used in the run. for example `"param": "overriding_val"`
5334
5563
  :param latest_repair_id: int (optional)
@@ -5343,13 +5572,13 @@ class JobsAPI:
5343
5572
 
5344
5573
  notebook_params cannot be specified in conjunction with jar_params.
5345
5574
 
5346
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5575
+ Use [Task parameter variables] to set parameters containing information about job runs.
5347
5576
 
5348
5577
  The JSON representation of this field (for example `{"notebook_params":{"name":"john
5349
5578
  doe","age":"35"}}`) cannot exceed 10,000 bytes.
5350
5579
 
5580
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5351
5581
  [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
5352
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5353
5582
  :param pipeline_params: :class:`PipelineParams` (optional)
5354
5583
  :param python_named_params: Dict[str,str] (optional)
5355
5584
  A map from keys to values for jobs with Python wheel task, for example `"python_named_params":
@@ -5360,7 +5589,7 @@ class JobsAPI:
5360
5589
  would overwrite the parameters specified in job setting. The JSON representation of this field (for
5361
5590
  example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
5362
5591
 
5363
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5592
+ Use [Task parameter variables] to set parameters containing information about job runs.
5364
5593
 
5365
5594
  Important
5366
5595
 
@@ -5368,7 +5597,7 @@ class JobsAPI:
5368
5597
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
5369
5598
  emojis.
5370
5599
 
5371
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5600
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5372
5601
  :param rerun_all_failed_tasks: bool (optional)
5373
5602
  If true, repair all failed tasks. Only one of `rerun_tasks` or `rerun_all_failed_tasks` can be used.
5374
5603
  :param rerun_dependent_tasks: bool (optional)
@@ -5383,7 +5612,7 @@ class JobsAPI:
5383
5612
  in job setting. The JSON representation of this field (for example `{"python_params":["john
5384
5613
  doe","35"]}`) cannot exceed 10,000 bytes.
5385
5614
 
5386
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5615
+ Use [Task parameter variables] to set parameters containing information about job runs
5387
5616
 
5388
5617
  Important
5389
5618
 
@@ -5391,7 +5620,7 @@ class JobsAPI:
5391
5620
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
5392
5621
  emojis.
5393
5622
 
5394
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5623
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5395
5624
  :param sql_params: Dict[str,str] (optional)
5396
5625
  A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john doe",
5397
5626
  "age": "35"}`. The SQL alert task does not support custom parameters.
@@ -5500,7 +5729,7 @@ class JobsAPI:
5500
5729
  The ID of the job to be executed
5501
5730
  :param dbt_commands: List[str] (optional)
5502
5731
  An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt
5503
- deps", "dbt seed", "dbt run"]`
5732
+ deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]`
5504
5733
  :param idempotency_token: str (optional)
5505
5734
  An optional token to guarantee the idempotency of job run requests. If a run with the provided token
5506
5735
  already exists, the request does not create a new run but returns the ID of the existing run
@@ -5521,9 +5750,8 @@ class JobsAPI:
5521
5750
  in conjunction with notebook_params. The JSON representation of this field (for example
5522
5751
  `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
5523
5752
 
5524
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5525
-
5526
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5753
+ Use [Task parameter variables](/jobs.html\"#parameter-variables\") to set parameters containing
5754
+ information about job runs.
5527
5755
  :param job_parameters: Dict[str,str] (optional)
5528
5756
  Job-level parameters used in the run. for example `"param": "overriding_val"`
5529
5757
  :param notebook_params: Dict[str,str] (optional)
@@ -5535,13 +5763,13 @@ class JobsAPI:
5535
5763
 
5536
5764
  notebook_params cannot be specified in conjunction with jar_params.
5537
5765
 
5538
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5766
+ Use [Task parameter variables] to set parameters containing information about job runs.
5539
5767
 
5540
5768
  The JSON representation of this field (for example `{"notebook_params":{"name":"john
5541
5769
  doe","age":"35"}}`) cannot exceed 10,000 bytes.
5542
5770
 
5771
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5543
5772
  [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html
5544
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5545
5773
  :param pipeline_params: :class:`PipelineParams` (optional)
5546
5774
  :param python_named_params: Dict[str,str] (optional)
5547
5775
  A map from keys to values for jobs with Python wheel task, for example `"python_named_params":
@@ -5552,7 +5780,7 @@ class JobsAPI:
5552
5780
  would overwrite the parameters specified in job setting. The JSON representation of this field (for
5553
5781
  example `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes.
5554
5782
 
5555
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5783
+ Use [Task parameter variables] to set parameters containing information about job runs.
5556
5784
 
5557
5785
  Important
5558
5786
 
@@ -5560,7 +5788,7 @@ class JobsAPI:
5560
5788
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
5561
5789
  emojis.
5562
5790
 
5563
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5791
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5564
5792
  :param queue: :class:`QueueSettings` (optional)
5565
5793
  The queue settings of the run.
5566
5794
  :param spark_submit_params: List[str] (optional)
@@ -5570,7 +5798,7 @@ class JobsAPI:
5570
5798
  in job setting. The JSON representation of this field (for example `{"python_params":["john
5571
5799
  doe","35"]}`) cannot exceed 10,000 bytes.
5572
5800
 
5573
- Use [task parameter variables] such as `{{job.id}}` to pass context about job runs.
5801
+ Use [Task parameter variables] to set parameters containing information about job runs
5574
5802
 
5575
5803
  Important
5576
5804
 
@@ -5578,7 +5806,7 @@ class JobsAPI:
5578
5806
  returns an error. Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and
5579
5807
  emojis.
5580
5808
 
5581
- [task parameter variables]: https://docs.databricks.com/workflows/jobs/parameter-value-references.html
5809
+ [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables
5582
5810
  :param sql_params: Dict[str,str] (optional)
5583
5811
  A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john doe",
5584
5812
  "age": "35"}`. The SQL alert task does not support custom parameters.
@@ -5661,13 +5889,23 @@ class JobsAPI:
5661
5889
  def submit(self,
5662
5890
  *,
5663
5891
  access_control_list: Optional[List[iam.AccessControlRequest]] = None,
5892
+ condition_task: Optional[ConditionTask] = None,
5893
+ dbt_task: Optional[DbtTask] = None,
5664
5894
  email_notifications: Optional[JobEmailNotifications] = None,
5665
5895
  git_source: Optional[GitSource] = None,
5666
5896
  health: Optional[JobsHealthRules] = None,
5667
5897
  idempotency_token: Optional[str] = None,
5898
+ notebook_task: Optional[NotebookTask] = None,
5668
5899
  notification_settings: Optional[JobNotificationSettings] = None,
5900
+ pipeline_task: Optional[PipelineTask] = None,
5901
+ python_wheel_task: Optional[PythonWheelTask] = None,
5669
5902
  queue: Optional[QueueSettings] = None,
5903
+ run_job_task: Optional[RunJobTask] = None,
5670
5904
  run_name: Optional[str] = None,
5905
+ spark_jar_task: Optional[SparkJarTask] = None,
5906
+ spark_python_task: Optional[SparkPythonTask] = None,
5907
+ spark_submit_task: Optional[SparkSubmitTask] = None,
5908
+ sql_task: Optional[SqlTask] = None,
5671
5909
  tasks: Optional[List[SubmitTask]] = None,
5672
5910
  timeout_seconds: Optional[int] = None,
5673
5911
  webhook_notifications: Optional[WebhookNotifications] = None) -> Wait[Run]:
@@ -5679,6 +5917,12 @@ class JobsAPI:
5679
5917
 
5680
5918
  :param access_control_list: List[:class:`AccessControlRequest`] (optional)
5681
5919
  List of permissions to set on the job.
5920
+ :param condition_task: :class:`ConditionTask` (optional)
5921
+ If condition_task, specifies a condition with an outcome that can be used to control the execution
5922
+ of other tasks. Does not require a cluster to execute and does not support retries or notifications.
5923
+ :param dbt_task: :class:`DbtTask` (optional)
5924
+ If dbt_task, indicates that this must execute a dbt task. It requires both Databricks SQL and the
5925
+ ability to use a serverless or a pro SQL warehouse.
5682
5926
  :param email_notifications: :class:`JobEmailNotifications` (optional)
5683
5927
  An optional set of email addresses notified when the run begins or completes.
5684
5928
  :param git_source: :class:`GitSource` (optional)
@@ -5705,13 +5949,44 @@ class JobsAPI:
5705
5949
  For more information, see [How to ensure idempotency for jobs].
5706
5950
 
5707
5951
  [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html
5952
+ :param notebook_task: :class:`NotebookTask` (optional)
5953
+ If notebook_task, indicates that this task must run a notebook. This field may not be specified in
5954
+ conjunction with spark_jar_task.
5708
5955
  :param notification_settings: :class:`JobNotificationSettings` (optional)
5709
5956
  Optional notification settings that are used when sending notifications to each of the
5710
5957
  `email_notifications` and `webhook_notifications` for this run.
5958
+ :param pipeline_task: :class:`PipelineTask` (optional)
5959
+ If pipeline_task, indicates that this task must execute a Pipeline.
5960
+ :param python_wheel_task: :class:`PythonWheelTask` (optional)
5961
+ If python_wheel_task, indicates that this job must execute a PythonWheel.
5711
5962
  :param queue: :class:`QueueSettings` (optional)
5712
5963
  The queue settings of the one-time run.
5964
+ :param run_job_task: :class:`RunJobTask` (optional)
5965
+ If run_job_task, indicates that this task must execute another job.
5713
5966
  :param run_name: str (optional)
5714
5967
  An optional name for the run. The default value is `Untitled`.
5968
+ :param spark_jar_task: :class:`SparkJarTask` (optional)
5969
+ If spark_jar_task, indicates that this task must run a JAR.
5970
+ :param spark_python_task: :class:`SparkPythonTask` (optional)
5971
+ If spark_python_task, indicates that this task must run a Python file.
5972
+ :param spark_submit_task: :class:`SparkSubmitTask` (optional)
5973
+ If `spark_submit_task`, indicates that this task must be launched by the spark submit script. This
5974
+ task can run only on new clusters.
5975
+
5976
+ In the `new_cluster` specification, `libraries` and `spark_conf` are not supported. Instead, use
5977
+ `--jars` and `--py-files` to add Java and Python libraries and `--conf` to set the Spark
5978
+ configurations.
5979
+
5980
+ `master`, `deploy-mode`, and `executor-cores` are automatically configured by Databricks; you
5981
+ _cannot_ specify them in parameters.
5982
+
5983
+ By default, the Spark submit job uses all available memory (excluding reserved memory for Databricks
5984
+ services). You can set `--driver-memory`, and `--executor-memory` to a smaller value to leave some
5985
+ room for off-heap usage.
5986
+
5987
+ The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 paths.
5988
+ :param sql_task: :class:`SqlTask` (optional)
5989
+ If sql_task, indicates that this job must execute a SQL task.
5715
5990
  :param tasks: List[:class:`SubmitTask`] (optional)
5716
5991
  :param timeout_seconds: int (optional)
5717
5992
  An optional timeout applied to each run of this job. A value of `0` means no timeout.
@@ -5725,13 +6000,23 @@ class JobsAPI:
5725
6000
  body = {}
5726
6001
  if access_control_list is not None:
5727
6002
  body['access_control_list'] = [v.as_dict() for v in access_control_list]
6003
+ if condition_task is not None: body['condition_task'] = condition_task.as_dict()
6004
+ if dbt_task is not None: body['dbt_task'] = dbt_task.as_dict()
5728
6005
  if email_notifications is not None: body['email_notifications'] = email_notifications.as_dict()
5729
6006
  if git_source is not None: body['git_source'] = git_source.as_dict()
5730
6007
  if health is not None: body['health'] = health.as_dict()
5731
6008
  if idempotency_token is not None: body['idempotency_token'] = idempotency_token
6009
+ if notebook_task is not None: body['notebook_task'] = notebook_task.as_dict()
5732
6010
  if notification_settings is not None: body['notification_settings'] = notification_settings.as_dict()
6011
+ if pipeline_task is not None: body['pipeline_task'] = pipeline_task.as_dict()
6012
+ if python_wheel_task is not None: body['python_wheel_task'] = python_wheel_task.as_dict()
5733
6013
  if queue is not None: body['queue'] = queue.as_dict()
6014
+ if run_job_task is not None: body['run_job_task'] = run_job_task.as_dict()
5734
6015
  if run_name is not None: body['run_name'] = run_name
6016
+ if spark_jar_task is not None: body['spark_jar_task'] = spark_jar_task.as_dict()
6017
+ if spark_python_task is not None: body['spark_python_task'] = spark_python_task.as_dict()
6018
+ if spark_submit_task is not None: body['spark_submit_task'] = spark_submit_task.as_dict()
6019
+ if sql_task is not None: body['sql_task'] = sql_task.as_dict()
5735
6020
  if tasks is not None: body['tasks'] = [v.as_dict() for v in tasks]
5736
6021
  if timeout_seconds is not None: body['timeout_seconds'] = timeout_seconds
5737
6022
  if webhook_notifications is not None: body['webhook_notifications'] = webhook_notifications.as_dict()
@@ -5746,25 +6031,45 @@ class JobsAPI:
5746
6031
  self,
5747
6032
  *,
5748
6033
  access_control_list: Optional[List[iam.AccessControlRequest]] = None,
6034
+ condition_task: Optional[ConditionTask] = None,
6035
+ dbt_task: Optional[DbtTask] = None,
5749
6036
  email_notifications: Optional[JobEmailNotifications] = None,
5750
6037
  git_source: Optional[GitSource] = None,
5751
6038
  health: Optional[JobsHealthRules] = None,
5752
6039
  idempotency_token: Optional[str] = None,
6040
+ notebook_task: Optional[NotebookTask] = None,
5753
6041
  notification_settings: Optional[JobNotificationSettings] = None,
6042
+ pipeline_task: Optional[PipelineTask] = None,
6043
+ python_wheel_task: Optional[PythonWheelTask] = None,
5754
6044
  queue: Optional[QueueSettings] = None,
6045
+ run_job_task: Optional[RunJobTask] = None,
5755
6046
  run_name: Optional[str] = None,
6047
+ spark_jar_task: Optional[SparkJarTask] = None,
6048
+ spark_python_task: Optional[SparkPythonTask] = None,
6049
+ spark_submit_task: Optional[SparkSubmitTask] = None,
6050
+ sql_task: Optional[SqlTask] = None,
5756
6051
  tasks: Optional[List[SubmitTask]] = None,
5757
6052
  timeout_seconds: Optional[int] = None,
5758
6053
  webhook_notifications: Optional[WebhookNotifications] = None,
5759
6054
  timeout=timedelta(minutes=20)) -> Run:
5760
6055
  return self.submit(access_control_list=access_control_list,
6056
+ condition_task=condition_task,
6057
+ dbt_task=dbt_task,
5761
6058
  email_notifications=email_notifications,
5762
6059
  git_source=git_source,
5763
6060
  health=health,
5764
6061
  idempotency_token=idempotency_token,
6062
+ notebook_task=notebook_task,
5765
6063
  notification_settings=notification_settings,
6064
+ pipeline_task=pipeline_task,
6065
+ python_wheel_task=python_wheel_task,
5766
6066
  queue=queue,
6067
+ run_job_task=run_job_task,
5767
6068
  run_name=run_name,
6069
+ spark_jar_task=spark_jar_task,
6070
+ spark_python_task=spark_python_task,
6071
+ spark_submit_task=spark_submit_task,
6072
+ sql_task=sql_task,
5768
6073
  tasks=tasks,
5769
6074
  timeout_seconds=timeout_seconds,
5770
6075
  webhook_notifications=webhook_notifications).result(timeout=timeout)