Skip to content

hive_text ​

Description ​

Positional text with Hive separators for collections and maps. Input uses its configured field parsing; output does not add escaping for embedded separators.

Input and output. Select it with FORMAT hive_text. Names ignore ASCII case; use the snake_case name shown here.

Fields are positional. Separate settings define row fields, collection members and map keys/values. The intended input layout must agree with the destination schema.

Output does not escape separator bytes embedded in a field. Use another format if arbitrary text could be confused with its delimiters. Missing values follow the format defaults and configured NULL text.

text
SELECT expressions FORMAT hive_text;
INSERT INTO table [(columns)] [SETTINGS ...] FORMAT hive_text
<data>

Example usage ​

sql
SELECT CAST(7 AS Int64) AS id, 'Ada' AS name FORMAT hive_text;
text
7Ada

Format settings ​

Use a statement SETTINGS clause; these options are not persisted by SET.

Setting Type Default Meaning
hive_text_collection_separator Char \x02 The byte between outermost Array and Tuple elements or Map entries on output; input uses bracketed values.
hive_text_map_separator Char \x03 The byte between outermost Map keys and values, also used at the next nested level on output.
hive_text_row_separator Char \n The byte ending each output row; input always reads newline-delimited CSV records.
hive_text_separator Char \x01 The byte between top-level fields when reading and writing, with no output quoting or escaping.
hive_text_uneven_rows Bool 1 Give omitted trailing input columns their DEFAULT and skip extra fields; off requires the exact field count.
snappy_mode String basic Read Snappy client files as basic (Hadoop blocks) or framed (standard streaming format).