external_locations
Creates, updates, deletes, gets or lists an external_locations
resource.
Overview
Name | external_locations |
Type | Resource |
Id | databricks_workspace.unitycatalog.external_locations |
Fields
The following fields are returned by SELECT
queries:
- get
- list
The external location was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
credential_id | string | |
metastore_id | string | |
credential_name | string | |
access_point | string | |
browse_only | boolean | |
comment | string | |
created_at | integer | |
created_by | string | |
isolation_mode | string | |
owner | string | |
read_only | boolean | |
updated_at | integer | |
updated_by | string | |
url | string |
The external location list was successfully retrieved.
Name | Datatype | Description |
---|---|---|
name | string | |
credential_id | string | |
metastore_id | string | |
credential_name | string | |
access_point | string | |
browse_only | boolean | |
comment | string | |
created_at | integer | |
created_by | string | |
isolation_mode | string | |
owner | string | |
read_only | boolean | |
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 an external location from the metastore. The caller must be either a metastore admin, the owner of the external location, or a user that has some privilege on the external location. | |
list | select | deployment_name | Gets an array of external locations ( | |
create | insert | deployment_name | Creates a new external location entry in the metastore. The caller must be a metastore admin or have the | |
update | update | deployment_name | Updates an external location in the metastore. The caller must be the owner of the external location, or be a metastore admin. In the second case, the admin can only update the name of the external location. | |
delete | delete | deployment_name | Deletes the specified external location from the metastore. The caller must be the owner of the external location. |
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 an external location from the metastore. The caller must be either a metastore admin, the owner of the external location, or a user that has some privilege on the external location.
SELECT
name,
credential_id,
metastore_id,
credential_name,
access_point,
browse_only,
comment,
created_at,
created_by,
isolation_mode,
owner,
read_only,
updated_at,
updated_by,
url
FROM databricks_workspace.unitycatalog.external_locations
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets an array of external locations (
SELECT
name,
credential_id,
metastore_id,
credential_name,
access_point,
browse_only,
comment,
created_at,
created_by,
isolation_mode,
owner,
read_only,
updated_at,
updated_by,
url
FROM databricks_workspace.unitycatalog.external_locations
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new external location entry in the metastore. The caller must be a metastore admin or have the
INSERT INTO databricks_workspace.unitycatalog.external_locations (
data__name,
data__url,
data__credential_name,
data__read_only,
data__comment,
data__access_point,
data__skip_validation,
deployment_name
)
SELECT
'{{ name }}',
'{{ url }}',
'{{ credential_name }}',
'{{ read_only }}',
'{{ comment }}',
'{{ access_point }}',
{{ skip_validation }},
'{{ deployment_name }}'
RETURNING
name,
credential_id,
metastore_id,
credential_name,
access_point,
browse_only,
comment,
created_at,
created_by,
isolation_mode,
owner,
read_only,
updated_at,
updated_by,
url
;
# Description fields are for documentation purposes
- name: external_locations
props:
- name: deployment_name
value: string
description: Required parameter for the external_locations resource.
- name: name
value: required
- name: url
value: string
- name: credential_name
value: required
- name: read_only
value: string
- name: comment
value: required
- name: access_point
value: string
- name: skip_validation
value: boolean
UPDATE
examples
- update
Updates an external location in the metastore. The caller must be the owner of the external location, or be a metastore admin. In the second case, the admin can only update the name of the external location.
UPDATE databricks_workspace.unitycatalog.external_locations
SET
data__url = '{{ url }}',
data__credential_name = '{{ credential_name }}',
data__read_only = {{ read_only }},
data__comment = '{{ comment }}',
data__owner = '{{ owner }}',
data__access_point = '{{ access_point }}',
data__isolation_mode = '{{ isolation_mode }}',
data__new_name = '{{ new_name }}',
data__force = {{ force }},
data__skip_validation = {{ skip_validation }}
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
name,
credential_id,
metastore_id,
credential_name,
access_point,
browse_only,
comment,
created_at,
created_by,
isolation_mode,
owner,
read_only,
updated_at,
updated_by,
url;
DELETE
examples
- delete
Deletes the specified external location from the metastore. The caller must be the owner of the external location.
DELETE FROM databricks_workspace.unitycatalog.external_locations
WHERE deployment_name = '{{ deployment_name }}' --required;