DESCRIBE FILE FORMAT

Descreve o tipo de propriedade (por exemplo, cadeia de caracteres ou inteiro), o valor definido da propriedade e o valor padrão de cada propriedade em uma definição de objeto de formato de arquivo. Para obter mais informações sobre as propriedades disponíveis para cada tipo de arquivo, consulte «Opções de tipo de formato « em CREATE FILE FORMAT.

DESCRIBE pode ser abreviado como DESC.

Consulte também:

DROP FILE FORMAT , ALTER FILE FORMAT , CREATE FILE FORMAT , SHOW FILE FORMATS

Sintaxe

DESC[RIBE] FILE FORMAT <name>
Copy

Parâmetros

name

Especifica o identificador do formato de arquivo a ser descrito. Se o identificador contiver espaços ou caracteres especiais, toda a cadeia de caracteres deverá ser delimitada por aspas duplas. Os identificadores delimitados por aspas duplas também diferenciam letras maiúsculas de minúsculas.

Notas de uso

  • Para pós-processar a saída deste comando, você pode usar a função RESULT_SCAN, que trata a saída como uma tabela que pode ser consultada.

Exemplos

Descreva o objeto de formato de arquivo nomeado my_csv_format:

DESC FILE FORMAT my_csv_format;
Copy

Saída:

+--------------------------------+---------------+----------------+------------------+
| 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       | 0              | 0                |
| PARSE_HEADER                   | Boolean       | FALSE          | FALSE            |
| 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          | [\\N]          | [\\N]            |
| COMPRESSION                    | String        | AUTO           | AUTO             |
| ERROR_ON_COLUMN_COUNT_MISMATCH | Boolean       | TRUE           | TRUE             |
| VALIDATE_UTF8                  | Boolean       | TRUE           | TRUE             |
| SKIP_BLANK_LINES               | Boolean       | FALSE          | FALSE            |
| REPLACE_INVALID_CHARACTERS     | Boolean       | FALSE          | FALSE            |
| EMPTY_FIELD_AS_NULL            | Boolean       | TRUE           | TRUE             |
| SKIP_BYTE_ORDER_MARK           | Boolean       | TRUE           | TRUE             |
| ENCODING                       | String        | UTF8           | UTF8             |
+--------------------------------+---------------+----------------+------------------+

Descreva o objeto de formato de arquivo nomeado my_json_format:

DESC FILE FORMAT `my_json_format`;
Copy

Saída:

+----------------------------+---------------+----------------+------------------+
| property                   | property_type | property_value | property_default |
+----------------------------+---------------+----------------+------------------+
| TYPE                       | String        | JSON           | CSV              |
| FILE_EXTENSION             | String        |                |                  |
| DATE_FORMAT                | String        | AUTO           | AUTO             |
| TIME_FORMAT                | String        | AUTO           | AUTO             |
| TIMESTAMP_FORMAT           | String        | AUTO           | AUTO             |
| BINARY_FORMAT              | String        | HEX            | HEX              |
| TRIM_SPACE                 | Boolean       | FALSE          | FALSE            |
| NULL_IF                    | List          | []             | [\\N]            |
| 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            |
| REPLACE_INVALID_CHARACTERS | Boolean       | FALSE          | FALSE            |
| SKIP_BYTE_ORDER_MARK       | Boolean       | TRUE           | TRUE             |
+----------------------------+---------------+----------------+------------------+

Descreva o objeto de formato de arquivo nomeado my_parquet_format:

DESC FILE FORMAT `my_parquet_format`;
Copy

Saída:

+----------------+---------------+----------------+------------------+
| property       | property_type | property_value | property_default |
+----------------+---------------+----------------+------------------+
| TYPE           | String        | PARQUET        | CSV              |
| TRIM_SPACE     | Boolean       | FALSE          | FALSE            |
| NULL_IF        | List          | []             | [\\N]            |
| COMPRESSION    | String        | SNAPPY         | AUTO             |
| BINARY_AS_TEXT | Boolean       | TRUE           | TRUE             |
+----------------+---------------+----------------+------------------+