Categories:
Data Loading / Unloading DDL

DESCRIBE FILE FORMAT

Describes the properties and their current values for a file format, as well as the default values for each property.

DESCRIBE can be abbreviated to DESC.

See also:
ALTER FILE FORMAT , CREATE FILE FORMAT , SHOW FILE FORMATS

Syntax

DESC[RIBE] FILE FORMAT <name>

Parameters

name
Specifies the identifier for the file format 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 the my_csv_format created in the CREATE FILE FORMAT examples:

DESC FILE FORMAT my_csv_format;

+--------------------------------+---------------+----------------+------------------+
| property                       | property_type | property_value | property_default |
|--------------------------------+---------------+----------------+------------------|
| TYPE                           | String        | CSV            | CSV              |
| RECORD_DELIMITER               | String        | \n             | \n               |
| FIELD_DELIMITER                | String        | |              | ,                |
| FILE_EXTENSION                 | String        |                |                  |
| SKIP_HEADER                    | Integer       | 1              | 0                |
| DATE_FORMAT                    | String        | AUTO           | AUTO             |
| TIME_FORMAT                    | String        | AUTO           | AUTO             |
| TIMESTAMP_FORMAT               | String        | AUTO           | AUTO             |
| BINARY_FORMAT                  | String        | HEX            | HEX              |
| ESCAPE                         | String        | NONE           | NONE             |
| ESCAPE_UNENCLOSED_FIELD        | String        | \\             | \\               |
| TRIM_SPACE                     | Boolean       | false          | false            |
| FIELD_OPTIONALLY_ENCLOSED_BY   | String        | NONE           | NONE             |
| NULL_IF                        | List          | [NULL, null]   | [\\N]            |
| COMPRESSION                    | String        | gzip           | AUTO             |
| ERROR_ON_COLUMN_COUNT_MISMATCH | Boolean       | true           | true             |
| VALIDATE_UTF8                  | Boolean       | true           | true             |
| EMPTY_FIELD_AS_NULL            | Boolean       | true           | true             |
| SKIP_BYTE_ORDER_MARK           | Boolean       | true           | true             |
| ENCODING                       | String        | UTF8           | UTF8             |
+--------------------------------+---------------+----------------+------------------+

Describe the my_json_format created in the CREATE FILE FORMAT examples:

DESC FILE FORMAT my_json_format;

+----------------------+---------------+----------------+------------------+
| property             | property_type | property_value | property_default |
|----------------------+---------------+----------------+------------------|
| TYPE                 | String        | JSON           | CSV              |
| FILE_EXTENSION       | String        |                |                  |
| COMPRESSION          | String        | AUTO           | AUTO             |
| ENABLE_OCTAL         | Boolean       | false          | false            |
| ALLOW_DUPLICATE      | Boolean       | false          | false            |
| STRIP_OUTER_ARRAY    | Boolean       | false          | false            |
| STRIP_NULL_VALUES    | Boolean       | false          | false            |
| IGNORE_UTF8_ERRORS   | Boolean       | false          | false            |
| SKIP_BYTE_ORDER_MARK | Boolean       | true           | true             |
+----------------------+---------------+----------------+------------------+