connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | databricks_workspace.catalog.connections |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the connection. |
connection_id | string | Unique identifier of the Connection. |
metastore_id | string | Unique identifier of parent metastore. |
full_name | string | Full name of connection. |
comment | string | |
connection_type | string | The type of connection. (ADOBE_COMMERCE, ADP_WORKFORCE_NOW, AHA, AIRTABLE, AMPLITUDE, APPFIGURES, APPLE_APP_STORE, APPLE_SEARCH_ADS, ATLASSIAN_ORGANIZATION, AWIN, AZURE_MONITOR_LOGS, BIGLAKE, BIGQUERY, CERIDIAN_DAYFORCE, CONFLUENCE, DATABRICKS, DELIGHTED, DYNAMICS365, EPIC_CLARITY, FRESHSERVICE, FRONT, GA4_RAW_DATA, GENESYS, GITHUB, GITLAB, GLUE, GMAIL, GONG, GOOGLE_ANALYTICS, GOOGLE_CALENDAR, GOOGLE_CLOUD_LAKEHOUSE, GOOGLE_WORKSPACE, GURU, HIBOB, HIVE_METASTORE, HTTP, HUBSPOT, ICEBERG_REST, IRONCLAD, JDBC, KINESIS, LINEAR, MARKETO, META_MARKETING, MICROSOFT_ENTRA_ID, MONDAY_COM, MYSQL, NETSKOPE_LOGS, NOTION, ORACLE, ORACLE_ELOQUA, ORACLE_FUSION_CLOUD, OUTLOOK, PAGERDUTY, PALANTIR, PARTNERSTACK, PENDO, POSTGRESQL, POWER_BI, PUBSUB, QUICKBOOKS, REDSHIFT, SALESFORCE, SALESFORCE_DATA_CLOUD, SALESLOFT, SAP_SUCCESSFACTORS, SAS, SENDGRID, SERVICENOW, SHOPIFY, SLACK_ACCESS_AND_INTEGRATION_LOGS, SMARTSHEET, SNAPCHAT_ADS, SNOWFLAKE, SPLUNK, SQLDW, SQLSERVER, SQUARE, TERADATA, UNKNOWN_CONNECTION_TYPE, VERKADA, WORKDAY_RAAS, YOUTUBE_ANALYTICS, ZENDESK, ZIP, ZOHO_BOOKS, ZOOM, ZOOM_LOGS) |
created_at | integer | Time at which this connection was created, in epoch milliseconds. |
created_by | string | Username of connection creator. |
credential_type | string | The type of credential. (ANY_STATIC_CREDENTIAL, BEARER_TOKEN, EDGEGRID_AKAMAI, GENERIC_TOKEN_EXCHANGE, INLINE_YAML, OAUTH_ACCESS_TOKEN, OAUTH_DCR, OAUTH_GOOGLE_SERVICE_ACCOUNT, OAUTH_M2M, OAUTH_MTLS, OAUTH_REFRESH_TOKEN, OAUTH_RESOURCE_OWNER_PASSWORD, OAUTH_U2M, OAUTH_U2M_MAPPING, OIDC_TOKEN, PEM_PRIVATE_KEY, SERVICE_CREDENTIAL, SSWS_TOKEN, UNKNOWN_CREDENTIAL_TYPE, USERNAME_PASSWORD) |
environment_settings | object | [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. |
options | object | A map of key-value properties attached to the securable. |
owner | string | Username of current owner of the connection. |
properties | object | A map of key-value properties attached to the securable. |
provisioning_info | object | Status of an asynchronously provisioned resource. |
read_only | boolean | If the connection is read only. |
secrets | object | A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. |
securable_type | string | The type of Unity Catalog securable. (CATALOG, CLEAN_ROOM, CONNECTION, CREDENTIAL, EXTERNAL_LOCATION, EXTERNAL_METADATA, FUNCTION, METASTORE, PIPELINE, PROVIDER, RECIPIENT, SCHEMA, SHARE, STAGING_TABLE, STORAGE_CREDENTIAL, TABLE, VOLUME) |
updated_at | integer | Time at which this connection was updated, in epoch milliseconds. |
updated_by | string | Username of user who last modified connection. |
url | string | URL of the remote data source, extracted from options. |
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the connection. |
connection_id | string | Unique identifier of the Connection. |
metastore_id | string | Unique identifier of parent metastore. |
full_name | string | Full name of connection. |
comment | string | |
connection_type | string | The type of connection. (ADOBE_COMMERCE, ADP_WORKFORCE_NOW, AHA, AIRTABLE, AMPLITUDE, APPFIGURES, APPLE_APP_STORE, APPLE_SEARCH_ADS, ATLASSIAN_ORGANIZATION, AWIN, AZURE_MONITOR_LOGS, BIGLAKE, BIGQUERY, CERIDIAN_DAYFORCE, CONFLUENCE, DATABRICKS, DELIGHTED, DYNAMICS365, EPIC_CLARITY, FRESHSERVICE, FRONT, GA4_RAW_DATA, GENESYS, GITHUB, GITLAB, GLUE, GMAIL, GONG, GOOGLE_ANALYTICS, GOOGLE_CALENDAR, GOOGLE_CLOUD_LAKEHOUSE, GOOGLE_WORKSPACE, GURU, HIBOB, HIVE_METASTORE, HTTP, HUBSPOT, ICEBERG_REST, IRONCLAD, JDBC, KINESIS, LINEAR, MARKETO, META_MARKETING, MICROSOFT_ENTRA_ID, MONDAY_COM, MYSQL, NETSKOPE_LOGS, NOTION, ORACLE, ORACLE_ELOQUA, ORACLE_FUSION_CLOUD, OUTLOOK, PAGERDUTY, PALANTIR, PARTNERSTACK, PENDO, POSTGRESQL, POWER_BI, PUBSUB, QUICKBOOKS, REDSHIFT, SALESFORCE, SALESFORCE_DATA_CLOUD, SALESLOFT, SAP_SUCCESSFACTORS, SAS, SENDGRID, SERVICENOW, SHOPIFY, SLACK_ACCESS_AND_INTEGRATION_LOGS, SMARTSHEET, SNAPCHAT_ADS, SNOWFLAKE, SPLUNK, SQLDW, SQLSERVER, SQUARE, TERADATA, UNKNOWN_CONNECTION_TYPE, VERKADA, WORKDAY_RAAS, YOUTUBE_ANALYTICS, ZENDESK, ZIP, ZOHO_BOOKS, ZOOM, ZOOM_LOGS) |
created_at | integer | Time at which this connection was created, in epoch milliseconds. |
created_by | string | Username of connection creator. |
credential_type | string | The type of credential. (ANY_STATIC_CREDENTIAL, BEARER_TOKEN, EDGEGRID_AKAMAI, GENERIC_TOKEN_EXCHANGE, INLINE_YAML, OAUTH_ACCESS_TOKEN, OAUTH_DCR, OAUTH_GOOGLE_SERVICE_ACCOUNT, OAUTH_M2M, OAUTH_MTLS, OAUTH_REFRESH_TOKEN, OAUTH_RESOURCE_OWNER_PASSWORD, OAUTH_U2M, OAUTH_U2M_MAPPING, OIDC_TOKEN, PEM_PRIVATE_KEY, SERVICE_CREDENTIAL, SSWS_TOKEN, UNKNOWN_CREDENTIAL_TYPE, USERNAME_PASSWORD) |
environment_settings | object | [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. |
options | object | A map of key-value properties attached to the securable. |
owner | string | Username of current owner of the connection. |
properties | object | A map of key-value properties attached to the securable. |
provisioning_info | object | Status of an asynchronously provisioned resource. |
read_only | boolean | If the connection is read only. |
secrets | object | A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. |
securable_type | string | The type of Unity Catalog securable. (CATALOG, CLEAN_ROOM, CONNECTION, CREDENTIAL, EXTERNAL_LOCATION, EXTERNAL_METADATA, FUNCTION, METASTORE, PIPELINE, PROVIDER, RECIPIENT, SCHEMA, SHARE, STAGING_TABLE, STORAGE_CREDENTIAL, TABLE, VOLUME) |
updated_at | integer | Time at which this connection was updated, in epoch milliseconds. |
updated_by | string | Username of user who last modified connection. |
url | string | URL of the remote data source, extracted from options. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | Gets a connection from it's name. | |
list | select | deployment_name | max_results, page_token, parent | List all connections. |
create | insert | deployment_name, name, connection_type, options | Creates a new connection | |
update | update | name, deployment_name, options | Updates the connection that matches the supplied name. | |
delete | delete | name, deployment_name | Deletes the connection that matches the supplied name. |
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) |
name | string | The name of the connection to be deleted. |
max_results | integer | Maximum number of connections to return. - If not set, all connections are returned (not recommended). - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value (recommended); - when set to a value less than 0, an invalid parameter error is returned; |
page_token | string | Opaque pagination token to go to next page based on previous query. |
parent | string | Optional. Parent schema filter for listing schema-level connections, in format "schemas/{catalog}.{schema}". |
SELECT examples
- get
- list
Gets a connection from it's name.
SELECT
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
environment_settings,
options,
owner,
properties,
provisioning_info,
read_only,
secrets,
securable_type,
updated_at,
updated_by,
url
FROM databricks_workspace.catalog.connections
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
List all connections.
SELECT
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
environment_settings,
options,
owner,
properties,
provisioning_info,
read_only,
secrets,
securable_type,
updated_at,
updated_by,
url
FROM databricks_workspace.catalog.connections
WHERE deployment_name = '{{ deployment_name }}' -- required
AND max_results = '{{ max_results }}'
AND page_token = '{{ page_token }}'
AND parent = '{{ parent }}'
;
INSERT examples
- create
- Manifest
Creates a new connection
INSERT INTO databricks_workspace.catalog.connections (
name,
connection_type,
options,
comment,
environment_settings,
parent,
properties,
read_only,
secrets,
deployment_name
)
SELECT
'{{ name }}' /* required */,
'{{ connection_type }}' /* required */,
'{{ options }}' /* required */,
'{{ comment }}',
'{{ environment_settings }}',
'{{ parent }}',
'{{ properties }}',
{{ read_only }},
'{{ secrets }}',
'{{ deployment_name }}'
RETURNING
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
environment_settings,
options,
owner,
properties,
provisioning_info,
read_only,
secrets,
securable_type,
updated_at,
updated_by,
url
;
# Description fields are for documentation purposes
- name: connections
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the connections resource.
- name: name
value: "{{ name }}"
description: |
Name of the connection.
- name: connection_type
value: "{{ connection_type }}"
description: |
The type of connection.
- name: options
value: "{{ options }}"
description: |
A map of key-value properties attached to the securable.
- name: comment
value: "{{ comment }}"
description: |
User-provided free-form text description.
- name: environment_settings
description: |
[Create,Update:OPT] Connection environment settings as EnvironmentSettings object.
value:
environment_version: "{{ environment_version }}"
java_dependencies:
- "{{ java_dependencies }}"
- name: parent
value: "{{ parent }}"
description: |
Parent schema for schema-level connections, in format "schemas/{catalog}.{schema}". Absent for metastore-level (L1) connections.
- name: properties
value: "{{ properties }}"
description: |
A map of key-value properties attached to the securable.
- name: read_only
value: {{ read_only }}
description: |
If the connection is read only.
- name: secrets
value: "{{ secrets }}"
description: |
A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names.
UPDATE examples
- update
Updates the connection that matches the supplied name.
UPDATE databricks_workspace.catalog.connections
SET
options = '{{ options }}',
environment_settings = '{{ environment_settings }}',
new_name = '{{ new_name }}',
owner = '{{ owner }}',
secrets = '{{ secrets }}'
WHERE
name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND options = '{{ options }}' --required
RETURNING
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
environment_settings,
options,
owner,
properties,
provisioning_info,
read_only,
secrets,
securable_type,
updated_at,
updated_by,
url;
DELETE examples
- delete
Deletes the connection that matches the supplied name.
DELETE FROM databricks_workspace.catalog.connections
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;