Job Runs

Package: databricks.bundles.job_runs

Classes

class JobRun
job_id: int

The ID of the job to be executed

job_parameters: dict[str, str]

Job-level parameters used in the run. for example “param”: “overriding_val”

lifecycle: JobRunLifecycle | None = None

Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed and when the run re-fires.

only: list[str]

A list of task keys to run inside of the job. If this field is not provided, all tasks in the job will be run.

Prefix a task key with + to also run its upstream tasks, or suffix it with + to also run its downstream tasks. For example, +my_task runs my_task and everything upstream of it, my_task+ runs my_task and everything downstream of it, and +my_task+ runs both. A task key with no + runs only that task.

performance_target: PerformanceTarget | None = None

The performance mode on a serverless job. The performance target determines the level of compute performance or cost-efficiency for the run. This field overrides the performance target defined on the job level.

  • PERFORMANCE_OPTIMIZED: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.

  • STANDARD: Enables cost-efficient execution of serverless workloads.

  • COST_OPTIMIZED: Enables lower job costs by optimizing compute for your selected target duration time. Must provide a duration target.

pipeline_params: PipelineParams | None = None

Controls whether the pipeline should perform a full refresh

queue: QueueSettings | None = None

The queue settings of the run.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class JobRunLifecycle
prevent_destroy: bool | None = None

Lifecycle setting to prevent the resource from being destroyed.

triggers: list[JobRunTrigger]

Conditions that re-fire this job run (in addition to configuration changes).

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class JobRunTrigger
on_bundle_deploy: bool | None = None

If true, re-fire the run on every bundle deploy.

on_file_change: str | None = None

Path or glob relative to the defining YAML file. It must resolve under the sync root. Re-fire the run when a matched file’s content hash changes, or when the set of matches appears or disappears. Only files the bundle syncs are hashed, so .gitignore and sync.exclude apply. Use * to match a single directory level; ** is not supported.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class PerformanceTarget

PerformanceTarget defines how performant (lower latency) or cost efficient the execution of run on serverless compute should be. The performance mode on the job or pipeline should map to a performance setting that is passed to Cluster Manager (see cluster-common PerformanceTarget).

PERFORMANCE_OPTIMIZED = 'PERFORMANCE_OPTIMIZED'
STANDARD = 'STANDARD'
class PipelineParams
full_refresh: bool | None = None

If true, triggers a full refresh on the spark declarative pipeline.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class QueueSettings
enabled: bool

If true, enable queueing for the job. This is a required field.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict