Skip to main content

job_compliance

Creates, updates, deletes, gets or lists a job_compliance resource.

Overview

Namejob_compliance
TypeResource
Iddatabricks_workspace.workflows.job_compliance

Fields

The following fields are returned by SELECT queries:

Request completed successfully.

NameDatatypeDescription
job_idinteger
is_compliantboolean
violationsobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listcomplianceselectdeployment_nameReturns the policy compliance status of all jobs that use a given policy. Jobs could be out of compliance if a cluster policy they use was updated after the job was last edited and its job clusters no longer comply with the updated policy.
getcomplianceselectdeployment_nameReturns the policy compliance status of a job. Jobs could be out of compliance if a cluster policy they use was updated after the job was last edited and some of its job clusters no longer comply with their updated policies.
enforcecompliancereplacedeployment_nameUpdates a job so the job clusters that are created when running the job (specified in

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Returns the policy compliance status of all jobs that use a given policy. Jobs could be out of compliance if a cluster policy they use was updated after the job was last edited and its job clusters no longer comply with the updated policy.

SELECT
job_id,
is_compliant,
violations
FROM databricks_workspace.workflows.job_compliance
WHERE deployment_name = '{{ deployment_name }}' -- required;

REPLACE examples

Updates a job so the job clusters that are created when running the job (specified in

REPLACE databricks_workspace.workflows.job_compliance
SET
data__job_id = '{{ job_id }}',
data__validate_only = {{ validate_only }}
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
has_changes,
job_cluster_changes,
settings;