external_volumes
Creates, updates, deletes, gets or lists a external_volumes
resource.
Overview
Name | external_volumes |
Type | Resource |
Id | snowflake.external_volume.external_volumes |
Fields
Name | Datatype | Description |
---|---|---|
name | string | String that specifies the identifier (the name) for the external volume; must be unique in your account. |
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 and time when the external volume was created. |
owner | string | Role that owns the external volume |
owner_role_type | string | The type of role that owns the external volume |
storage_locations | array | Set of named cloud storage locations in different regions and, optionally, cloud platforms. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
fetch_external_volume | SELECT | name, endpoint | Fetch an external volume |
list_external_volumes | SELECT | endpoint | List external volumes |
create_external_volume | INSERT | data__name, data__storage_locations, endpoint | Create an external volume |
delete_external_volume | DELETE | name, endpoint | Delete an external volume |
undrop_external_volume | EXEC | name, endpoint | Undrop an external volume |
SELECT
examples
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 }}';
INSERT
example
Use the following StackQL query and manifest file to create a new external_volumes
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO snowflake.external_volume.external_volumes (
data__name,
data__storage_locations,
data__allow_writes,
data__comment,
endpoint
)
SELECT
'{{ name }}',
'{{ storage_locations }}',
'{{ allow_writes }}',
'{{ comment }}',
'{{ endpoint }}'
;
/*+ create */
INSERT INTO snowflake.external_volume.external_volumes (
data__name,
data__storage_locations,
endpoint
)
SELECT
'{{ name }}',
'{{ storage_locations }}',
'{{ endpoint }}'
;
- name: external_volumes
props:
- name: data__name
value: string
- name: data__storage_locations
value: string
- name: endpoint
value: string
- name: name
value: string
- name: storage_locations
value: array
props:
- name: name
value: string
- name: storage_provider
value: string
- name: allow_writes
value: boolean
- name: comment
value: string
DELETE
example
Deletes the specified external_volumes
resource.
/*+ delete */
DELETE FROM snowflake.external_volume.external_volumes
WHERE name = '{{ name }}'
AND endpoint = '{{ endpoint }}';