external_volumes
Creates, updates, deletes, gets or lists an external_volumes
resource.
Overview
Name | external_volumes |
Type | Resource |
Id | snowflake.external_volume.external_volumes |
Fields
The following fields are returned by SELECT
queries:
- list_external_volumes
- fetch_external_volume
A Snowflake external volume
Name | Datatype | Description |
---|---|---|
name | string | String that specifies the identifier (the name) for the external volume; must be unique in your account. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
allow_writes | boolean | Specifies whether write operations are allowed for the external volume; must be set to TRUE for Iceberg tables that use Snowflake as the catalog. |
comment | string | String (literal) that specifies a comment for the external volume. |
created_on | string (date-time) | Date and time when the external volume was created. |
owner | string | Role that owns the external volume (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
owner_role_type | string | The type of role that owns the external volume (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
storage_locations | array | Set of named cloud storage locations in different regions and, optionally, cloud platforms. |
A Snowflake external volume
Name | Datatype | Description |
---|---|---|
name | string | String that specifies the identifier (the name) for the external volume; must be unique in your account. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
allow_writes | boolean | Specifies whether write operations are allowed for the external volume; must be set to TRUE for Iceberg tables that use Snowflake as the catalog. |
comment | string | String (literal) that specifies a comment for the external volume. |
created_on | string (date-time) | Date and time when the external volume was created. |
owner | string | Role that owns the external volume (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
owner_role_type | string | The type of role that owns the external volume (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$) |
storage_locations | array | Set of named cloud storage locations in different regions and, optionally, cloud platforms. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_external_volumes | select | endpoint | like | List external volumes |
fetch_external_volume | select | name , endpoint | Fetch an external volume | |
create_external_volume | insert | endpoint | createMode | Create an external volume |
delete_external_volume | delete | name , endpoint | ifExists | Delete an external volume |
undrop_external_volume | exec | name , endpoint | Undrop an external volume |
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 |
---|---|---|
endpoint | string | Organization and Account Name (default: orgid-acctid) |
name | string | Identifier (i.e. name) for the resource. |
createMode | string | Query parameter allowing support for different modes of resource creation. Possible values include: - errorIfExists : Throws an error if you try to create a resource that already exists. - orReplace : Automatically replaces the existing resource with the current one. - ifNotExists : Creates a new resource when an alter is requested for a non-existent resource. |
ifExists | boolean | Query parameter that specifies how to handle the request for a resource that does not exist: - true : The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - false : The endpoint throws an error if the resource doesn't exist. |
like | string | Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. |
SELECT
examples
- list_external_volumes
- fetch_external_volume
List external volumes
SELECT
name,
allow_writes,
comment,
created_on,
owner,
owner_role_type,
storage_locations
FROM snowflake.external_volume.external_volumes
WHERE endpoint = '{{ endpoint }}' -- required
AND like = '{{ like }}';
Fetch an external volume
SELECT
name,
allow_writes,
comment,
created_on,
owner,
owner_role_type,
storage_locations
FROM snowflake.external_volume.external_volumes
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required;
INSERT
examples
- create_external_volume
- Manifest
Create an external volume
INSERT INTO snowflake.external_volume.external_volumes (
data__name,
data__storage_locations,
data__allow_writes,
data__comment,
endpoint,
createMode
)
SELECT
'{{ name }}' --required,
'{{ storage_locations }}' --required,
{{ allow_writes }},
'{{ comment }}',
'{{ endpoint }}',
'{{ createMode }}'
;
# Description fields are for documentation purposes
- name: external_volumes
props:
- name: endpoint
value: string
description: Required parameter for the external_volumes resource.
- name: name
value: string
description: >
String that specifies the identifier (the name) for the external volume; must be unique in your account.
- name: storage_locations
value: array
description: >
Set of named cloud storage locations in different regions and, optionally, cloud platforms.
- name: allow_writes
value: boolean
description: >
Specifies whether write operations are allowed for the external volume; must be set to TRUE for Iceberg tables that use Snowflake as the catalog.
- name: comment
value: string
description: >
String (literal) that specifies a comment for the external volume.
- name: createMode
value: string
description: Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.
DELETE
examples
- delete_external_volume
Delete an external volume
DELETE FROM snowflake.external_volume.external_volumes
WHERE name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND ifExists = '{{ ifExists }}';
Lifecycle Methods
- undrop_external_volume
Undrop an external volume
EXEC snowflake.external_volume.external_volumes.undrop_external_volume
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required;