job_compliance
Creates, updates, deletes, gets or lists a job_compliance
resource.
Overview
Name | job_compliance |
Type | Resource |
Id | databricks_workspace.workflows.job_compliance |
Fields
The following fields are returned by SELECT
queries:
- listcompliance
- getcompliance
Request completed successfully.
Name | Datatype | Description |
---|---|---|
job_id | integer | |
is_compliant | boolean | |
violations | object |
Request completed successfully.
Name | Datatype | Description |
---|---|---|
is_compliant | boolean | |
violations | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
listcompliance | select | 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. | |
getcompliance | select | 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. | |
enforcecompliance | replace | deployment_name | Updates 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.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- listcompliance
- getcompliance
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;
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.
SELECT
is_compliant,
violations
FROM databricks_workspace.workflows.job_compliance
WHERE deployment_name = '{{ deployment_name }}' -- required;
REPLACE
examples
- enforcecompliance
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;