Categories:

Data Loading / Unloading DDL

DESCRIBE STAGE

Describes the values specified for the properties in a stage (file format, copy, and location), as well as the default values for each property.

DESCRIBE can be abbreviated to DESC.

See also:

ALTER STAGE , CREATE STAGE , SHOW STAGES

Syntax

DESC[RIBE] STAGE <name>

Parameters

name

Specifies the identifier for the stage to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Usage Notes

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Examples

Describe four named internal stages that each use all the defaults for their corresponding file format options:

  • my_int_stage (created in the CREATE STAGE examples), which uses the CSV file format type.

  • my_json_stage, which uses the JSON file format type.

  • my_avro_stage, which uses the AVRO file format type.

  • my_xml_stage, which uses the XML file format type.

Note that the URL property is null for all four stages are internal:

DESC STAGE my_int_stage;

+--------------------+--------------------------------+---------------+----------------+------------------+
| parent_property    | property                       | property_type | property_value | property_default |
|--------------------+--------------------------------+---------------+----------------+------------------|
| STAGE_FILE_FORMAT  | TYPE                           | String        | CSV            | CSV              |
| STAGE_FILE_FORMAT  | RECORD_DELIMITER               | String        | \n             | \n               |
| STAGE_FILE_FORMAT  | FIELD_DELIMITER                | String        | ,              | ,                |
| STAGE_FILE_FORMAT  | FILE_EXTENSION                 | String        |                |                  |
| STAGE_FILE_FORMAT  | SKIP_HEADER                    | Integer       | 0              | 0                |
| STAGE_FILE_FORMAT  | DATE_FORMAT                    | String        | AUTO           | AUTO             |
| STAGE_FILE_FORMAT  | TIME_FORMAT                    | String        | AUTO           | AUTO             |
| STAGE_FILE_FORMAT  | TIMESTAMP_FORMAT               | String        | AUTO           | AUTO             |
| STAGE_FILE_FORMAT  | BINARY_FORMAT                  | String        | HEX            | HEX              |
| STAGE_FILE_FORMAT  | ESCAPE                         | String        | NONE           | NONE             |
| STAGE_FILE_FORMAT  | ESCAPE_UNENCLOSED_FIELD        | String        | \\             | \\               |
| STAGE_FILE_FORMAT  | TRIM_SPACE                     | Boolean       | false          | false            |
| STAGE_FILE_FORMAT  | FIELD_OPTIONALLY_ENCLOSED_BY   | String        | NONE           | NONE             |
| STAGE_FILE_FORMAT  | NULL_IF                        | List          | [\\N]          | [\\N]            |
| STAGE_FILE_FORMAT  | COMPRESSION                    | String        | AUTO           | AUTO             |
| STAGE_FILE_FORMAT  | ERROR_ON_COLUMN_COUNT_MISMATCH | Boolean       | true           | true             |
| STAGE_FILE_FORMAT  | VALIDATE_UTF8                  | Boolean       | true           | true             |
| STAGE_FILE_FORMAT  | EMPTY_FIELD_AS_NULL            | Boolean       | true           | true             |
| STAGE_FILE_FORMAT  | SKIP_BYTE_ORDER_MARK           | Boolean       | true           | true             |
| STAGE_FILE_FORMAT  | ENCODING                       | String        | UTF8           | UTF8             |
| STAGE_COPY_OPTIONS | ON_ERROR                       | String        | skip_file      | ABORT_STATEMENT  |
| STAGE_COPY_OPTIONS | SIZE_LIMIT                     | Long          |                |                  |
| STAGE_COPY_OPTIONS | PURGE                          | Boolean       | false          | false            |
| STAGE_COPY_OPTIONS | RETURN_FAILED_ONLY             | Boolean       | false          | false            |
| STAGE_COPY_OPTIONS | ENFORCE_LENGTH                 | Boolean       | true           | true             |
| STAGE_COPY_OPTIONS | TRUNCATECOLUMNS                | Boolean       | false          | false            |
| STAGE_COPY_OPTIONS | FORCE                          | Boolean       | false          | false            |
| STAGE_LOCATION     | URL                            | String        |                |                  |
+--------------------+--------------------------------+---------------+----------------+------------------+

DESC STAGE my_json_stage;

+--------------------+----------------------+---------------+-----------------+------------------+
| parent_property    | property             | property_type | property_value  | property_default |
|--------------------+----------------------+---------------+-----------------+------------------|
| STAGE_FILE_FORMAT  | TYPE                 | String        | json            | CSV              |
| STAGE_FILE_FORMAT  | FILE_EXTENSION       | String        |                 |                  |
| STAGE_FILE_FORMAT  | COMPRESSION          | String        | AUTO            | AUTO             |
| STAGE_FILE_FORMAT  | ENABLE_OCTAL         | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | ALLOW_DUPLICATE      | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | STRIP_OUTER_ARRAY    | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | STRIP_NULL_VALUES    | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | IGNORE_UTF8_ERRORS   | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | SKIP_BYTE_ORDER_MARK | Boolean       | true            | true             |
| STAGE_COPY_OPTIONS | ON_ERROR             | String        | ABORT_STATEMENT | ABORT_STATEMENT  |
| STAGE_COPY_OPTIONS | SIZE_LIMIT           | Long          |                 |                  |
| STAGE_COPY_OPTIONS | PURGE                | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | RETURN_FAILED_ONLY   | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | ENFORCE_LENGTH       | Boolean       | true            | true             |
| STAGE_COPY_OPTIONS | TRUNCATECOLUMNS      | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | FORCE                | Boolean       | false           | false            |
| STAGE_LOCATION     | URL                  | String        |                 |                  |
+--------------------+----------------------+---------------+-----------------+------------------+

DESC STAGE my_avro_stage;

+--------------------+--------------------+---------------+-----------------+------------------+
| parent_property    | property           | property_type | property_value  | property_default |
|--------------------+--------------------+---------------+-----------------+------------------|
| STAGE_FILE_FORMAT  | TYPE               | String        | avro            | CSV              |
| STAGE_FILE_FORMAT  | COMPRESSION        | String        | AUTO            | AUTO             |
| STAGE_COPY_OPTIONS | ON_ERROR           | String        | ABORT_STATEMENT | ABORT_STATEMENT  |
| STAGE_COPY_OPTIONS | SIZE_LIMIT         | Long          |                 |                  |
| STAGE_COPY_OPTIONS | PURGE              | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | RETURN_FAILED_ONLY | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | ENFORCE_LENGTH     | Boolean       | true            | true             |
| STAGE_COPY_OPTIONS | TRUNCATECOLUMNS    | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | FORCE              | Boolean       | false           | false            |
| STAGE_LOCATION     | URL                | String        |                 |                  |
+--------------------+--------------------+---------------+-----------------+------------------+

DESC STAGE my_xml_stage;

+--------------------+------------------------+---------------+-----------------+------------------+
| parent_property    | property               | property_type | property_value  | property_default |
|--------------------+------------------------+---------------+-----------------+------------------|
| STAGE_FILE_FORMAT  | TYPE                   | String        | xml             | CSV              |
| STAGE_FILE_FORMAT  | COMPRESSION            | String        | AUTO            | AUTO             |
| STAGE_FILE_FORMAT  | IGNORE_UTF8_ERRORS     | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | PRESERVE_SPACE         | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | STRIP_OUTER_ELEMENT    | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | DISABLE_SNOWFLAKE_DATA | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | DISABLE_AUTO_CONVERT   | Boolean       | false           | false            |
| STAGE_FILE_FORMAT  | SKIP_BYTE_ORDER_MARK   | Boolean       | true            | true             |
| STAGE_COPY_OPTIONS | ON_ERROR               | String        | ABORT_STATEMENT | ABORT_STATEMENT  |
| STAGE_COPY_OPTIONS | SIZE_LIMIT             | Long          |                 |                  |
| STAGE_COPY_OPTIONS | PURGE                  | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | RETURN_FAILED_ONLY     | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | ENFORCE_LENGTH         | Boolean       | true            | true             |
| STAGE_COPY_OPTIONS | TRUNCATECOLUMNS        | Boolean       | false           | false            |
| STAGE_COPY_OPTIONS | FORCE                  | Boolean       | false           | false            |
| STAGE_LOCATION     | URL                    | String        |                 |                  |
+--------------------+------------------------+---------------+-----------------+------------------+