Skip to main content

job_compliance

Operations on a job_compliance resource.

Overview

Namejob_compliance
TypeResource
Iddatabricks_workspace.workflows.job_compliance

Fields

NameDatatype
is_compliantboolean
job_idinteger
violationsobject

Methods

NameAccessible byRequired ParamsDescription
getcomplianceSELECTjob_id, deployment_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.
listcomplianceSELECTpolicy_id, deployment_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.
enforcecomplianceREPLACEdeployment_nameUpdates a job so the job clusters that are created when running the job (specified in

SELECT examples

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

REPLACE example

Replaces a job_compliance resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_workspace.workflows.job_compliance
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE deployment_name = '{{ deployment_name }}';