Skip to main content

connections

Creates, updates, deletes, gets or lists a connections resource.

Overview

Nameconnections
TypeResource
Iddatabricks_workspace.catalog.connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringName of the connection.
connection_idstringUnique identifier of the Connection.
metastore_idstringUnique identifier of parent metastore.
full_namestringFull name of connection.
commentstring
connection_typestringThe 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_atintegerTime at which this connection was created, in epoch milliseconds.
created_bystringUsername of connection creator.
credential_typestringThe 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_settingsobject[Create,Update:OPT] Connection environment settings as EnvironmentSettings object.
optionsobjectA map of key-value properties attached to the securable.
ownerstringUsername of current owner of the connection.
propertiesobjectA map of key-value properties attached to the securable.
provisioning_infoobjectStatus of an asynchronously provisioned resource.
read_onlybooleanIf the connection is read only.
secretsobjectA 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_typestringThe 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_atintegerTime at which this connection was updated, in epoch milliseconds.
updated_bystringUsername of user who last modified connection.
urlstringURL of the remote data source, extracted from options.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectname, deployment_nameGets a connection from it's name.
listselectdeployment_namemax_results, page_token, parentList all connections.
createinsertdeployment_name, name, connection_type, optionsCreates a new connection
updateupdatename, deployment_name, optionsUpdates the connection that matches the supplied name.
deletedeletename, deployment_nameDeletes 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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
namestringThe name of the connection to be deleted.
max_resultsintegerMaximum 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_tokenstringOpaque pagination token to go to next page based on previous query.
parentstringOptional. Parent schema filter for listing schema-level connections, in format "schemas/{catalog}.{schema}".

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes the connection that matches the supplied name.

DELETE FROM databricks_workspace.catalog.connections
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;