job_compliance
Operations on a job_compliance
resource.
Overview
Name | job_compliance |
Type | Resource |
Id | databricks_workspace.workflows.job_compliance |
Fields
Name | Datatype |
---|---|
is_compliant | boolean |
job_id | integer |
violations | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
getcompliance | SELECT | job_id, deployment_name | Returns 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. |
listcompliance | SELECT | policy_id, deployment_name | 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. |
enforcecompliance | REPLACE | deployment_name | Updates a job so the job clusters that are created when running the job (specified in |
SELECT
examples
- job_compliance (getcompliance)
- job_compliance (listcompliance)
SELECT
is_compliant,
job_id,
violations
FROM databricks_workspace.workflows.job_compliance
WHERE job_id = '{{ job_id }}' AND
deployment_name = '{{ deployment_name }}';
SELECT
is_compliant,
job_id,
violations
FROM databricks_workspace.workflows.job_compliance
WHERE policy_id = '{{ policy_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 }}';