DESCRIBE FILE FORMAT

Beschreibt den Eigenschaftstyp (zum Beispiel Zeichenfolge oder Ganzzahl), den definierten Wert der Eigenschaft und den Standardwert für jede Eigenschaft in einer Dateiformat-Objektdefinition. Weitere Informationen zu den verfügbaren Eigenschaften für die einzelnen Dateitypen finden Sie unter „Optionen für Formattypen „ in CREATE FILE FORMAT.

DESCRIBE kann mit DESC abgekürzt werden.

Siehe auch:

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

Syntax

DESC[RIBE] FILE FORMAT <name>
Copy

Parameter

name

Gibt den Bezeichner für das zu beschreibende Dateiformat an. Wenn der Bezeichner Leerzeichen oder Sonderzeichen enthält, muss die gesamte Zeichenfolge in doppelte Anführungszeichen gesetzt werden. Bei Bezeichnern, die in doppelte Anführungszeichen eingeschlossen sind, ist auch die Groß- und Kleinschreibung zu beachten.

Nutzungshinweise

  • Um die Ausgabe dieses Befehls nachzubearbeiten, können Sie den Befehl Pipe-Operator (->>) oder die RESULT_SCAN-Funktion verwenden. Beide Konstrukte behandeln die Ausgabe als Resultset, das Sie abfragen können.

    For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.

    When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column type, specify SELECT "type".

    You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.

Beispiele

Beschreiben des Dateiformat-Objekts namens my_csv_format:

DESC FILE FORMAT my_csv_format;
Copy

Ausgabe:

+--------------------------------+---------------+----------------+------------------+
| 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             |
+--------------------------------+---------------+----------------+------------------+

Beschreiben des Dateiformat-Objekts namens my_json_format:

DESC FILE FORMAT `my_json_format`;
Copy

Ausgabe:

+----------------------------+---------------+----------------+------------------+
| 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             |
+----------------------------+---------------+----------------+------------------+

Beschreiben des Dateiformat-Objekts namens my_parquet_format:

DESC FILE FORMAT `my_parquet_format`;
Copy

Ausgabe:

+----------------+---------------+----------------+------------------+
| 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             |
+----------------+---------------+----------------+------------------+