catalog_configs
Creates, updates, deletes, gets or lists a catalog_configs resource.
Overview​
| Name | catalog_configs |
| Type | Resource |
| Id | databricks_workspace.dataclassification.catalog_configs |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name in the format: catalogs/{catalog_name}/config. |
auto_tag_configs | array | List of auto-tagging configurations for this catalog. Empty list means no auto-tagging is enabled. |
excluded_schemas | object | Schemas to exclude from the scan, each named relative to the parent catalog. If specified, all schemas except the specified ones will be scanned. Mutually exclusive with ``included_schemas``: only one may be set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned. |
included_schemas | object | Schemas to include in the scan, each named relative to the parent catalog. If specified, only listed schemas will be scanned. Mutually exclusive with ``excluded_schemas``: only one may be set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | catalog_name, deployment_name, workspace_domain | Get the Data Classification configuration for a catalog. | |
create | insert | catalog_name, deployment_name, workspace_domain | Create Data Classification configuration for a catalog. | |
update | update | catalog_name, update_mask, deployment_name, workspace_domain | Update the Data Classification configuration for a catalog. | |
delete | delete | catalog_name, deployment_name, workspace_domain | Delete Data Classification configuration for a catalog. |
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 |
|---|---|---|
catalog_name | string | The catalog_name segment of the name resource name (catalogs/{catalog_name}/config). Resource name in the format: catalogs/{catalog_name}/config |
deployment_name | string | The Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME) |
update_mask | object | Field mask specifying which fields to update. |
workspace_domain | string | The Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}}) |
SELECT examples​
- get
Get the Data Classification configuration for a catalog.
SELECT
name,
auto_tag_configs,
excluded_schemas,
included_schemas
FROM databricks_workspace.dataclassification.catalog_configs
WHERE catalog_name = '{{ catalog_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;
INSERT examples​
- create
- Manifest
Create Data Classification configuration for a catalog.
INSERT INTO databricks_workspace.dataclassification.catalog_configs (
auto_tag_configs,
excluded_schemas,
included_schemas,
name,
catalog_name,
deployment_name,
workspace_domain
)
SELECT
'{{ auto_tag_configs }}',
'{{ excluded_schemas }}',
'{{ included_schemas }}',
'{{ name }}',
'{{ catalog_name }}',
'{{ deployment_name }}',
'{{ workspace_domain }}'
RETURNING
name,
auto_tag_configs,
excluded_schemas,
included_schemas
;
# Description fields are for documentation purposes
- name: catalog_configs
props:
- name: catalog_name
value: "{{ catalog_name }}"
description: Required parameter for the catalog_configs resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the catalog_configs resource.
- name: workspace_domain
value: "{{ workspace_domain }}"
description: Required parameter for the catalog_configs resource.
- name: auto_tag_configs
description: |
List of auto-tagging configurations for this catalog. Empty list means no auto-tagging is enabled.
value:
- classification_tag: "{{ classification_tag }}"
auto_tagging_mode: "{{ auto_tagging_mode }}"
- name: excluded_schemas
description: |
Schemas to exclude from the scan, each named relative to the parent catalog. If specified, all schemas except the specified ones will be scanned. Mutually exclusive with ``included_schemas``: only one may be set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned.
value:
names:
- "{{ names }}"
- name: included_schemas
description: |
Schemas to include in the scan, each named relative to the parent catalog. If specified, only listed schemas will be scanned. Mutually exclusive with ``excluded_schemas``: only one may be set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned.
value:
names:
- "{{ names }}"
- name: name
value: "{{ name }}"
description: |
Resource name in the format: catalogs/{catalog_name}/config.
UPDATE examples​
- update
Update the Data Classification configuration for a catalog.
UPDATE databricks_workspace.dataclassification.catalog_configs
SET
auto_tag_configs = '{{ auto_tag_configs }}',
excluded_schemas = '{{ excluded_schemas }}',
included_schemas = '{{ included_schemas }}',
name = '{{ name }}'
WHERE
catalog_name = '{{ catalog_name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
RETURNING
name,
auto_tag_configs,
excluded_schemas,
included_schemas;
DELETE examples​
- delete
Delete Data Classification configuration for a catalog.
DELETE FROM databricks_workspace.dataclassification.catalog_configs
WHERE catalog_name = '{{ catalog_name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
;