connections
Creates, updates, deletes, gets or lists a connections
resource.
Overview
Name | connections |
Type | Resource |
Id | databricks_workspace.unitycatalog.connections |
Fields
The following fields are returned by SELECT
queries:
- get
- list
The connection was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
connection_id | string | |
metastore_id | string | |
full_name | string | |
comment | string | |
connection_type | string | |
created_at | integer | |
created_by | string | |
credential_type | string | |
options | object | |
owner | string | |
properties | object | |
provisioning_info | object | |
read_only | boolean | |
securable_kind | string | |
securable_type | string | |
updated_at | integer | |
updated_by | string | |
url | string |
The connection list was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
connection_id | string | |
metastore_id | string | |
full_name | string | |
comment | string | |
connection_type | string | |
created_at | integer | |
created_by | string | |
credential_type | string | |
options | object | |
owner | string | |
properties | object | |
provisioning_info | object | |
read_only | boolean | |
securable_kind | string | |
securable_type | string | |
updated_at | integer | |
updated_by | string | |
url | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Gets a connection from it's name. | |
list | select | deployment_name | List all connections. | |
create | insert | deployment_name | Creates a new connection | |
update | update | deployment_name | Updates the connection that matches the supplied name. | |
delete | delete | 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) |
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,
options,
owner,
properties,
provisioning_info,
read_only,
securable_kind,
securable_type,
updated_at,
updated_by,
url
FROM databricks_workspace.unitycatalog.connections
WHERE 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,
options,
owner,
properties,
provisioning_info,
read_only,
securable_kind,
securable_type,
updated_at,
updated_by,
url
FROM databricks_workspace.unitycatalog.connections
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new connection
INSERT INTO databricks_workspace.unitycatalog.connections (
data__name,
data__connection_type,
data__read_only,
data__comment,
data__options,
data__properties,
deployment_name
)
SELECT
'{{ name }}',
'{{ connection_type }}',
'{{ read_only }}',
'{{ comment }}',
'{{ options }}',
'{{ properties }}',
'{{ deployment_name }}'
RETURNING
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
options,
owner,
properties,
provisioning_info,
read_only,
securable_kind,
securable_type,
updated_at,
updated_by,
url
;
# Description fields are for documentation purposes
- name: connections
props:
- name: deployment_name
value: string
description: Required parameter for the connections resource.
- name: name
value: required
- name: connection_type
value: string
- name: read_only
value: required
- name: comment
value: string
- name: options
value: required
- name: properties
value: object
UPDATE
examples
- update
Updates the connection that matches the supplied name.
UPDATE databricks_workspace.unitycatalog.connections
SET
data__owner = '{{ owner }}',
data__new_name = '{{ new_name }}',
data__options = '{{ options }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
connection_id,
metastore_id,
full_name,
comment,
connection_type,
created_at,
created_by,
credential_type,
options,
owner,
properties,
provisioning_info,
read_only,
securable_kind,
securable_type,
updated_at,
updated_by,
url;
DELETE
examples
- delete
Deletes the connection that matches the supplied name.
DELETE FROM databricks_workspace.unitycatalog.connections
WHERE deployment_name = '{{ deployment_name }}' --required;