TabSeparatedWithNamesAndTypes
Input | Output | Alias |
---|---|---|
✔ | ✔ | TSVWithNamesAndTypes , RawWithNamesAndTypes |
Description
Differs from the TabSeparated
format in that the column names are written to the first row, while the column types are in the second row.
note
- If setting
input_format_with_names_use_header
is set to1
, the columns from the input data will be mapped to the columns in the table by their names, columns with unknown names will be skipped if settinginput_format_skip_unknown_fields
is set to 1. Otherwise, the first row will be skipped. - If setting
input_format_with_types_use_header
is set to1
, the types from input data will be compared with the types of the corresponding columns from the table. Otherwise, the second row will be skipped.
Example Usage
Inserting Data
Using the following tsv file, named as football.tsv
:
Insert the data:
Reading Data
Read data using the TabSeparatedWithNamesAndTypes
format:
The output will be in tab separated format with two header rows for column names and types: