JSONCompactEachRowWithNames
Input | Output | Alias |
---|---|---|
✔ | ✔ |
Description
Differs from the JSONCompactEachRow
format in that it also prints the header row with column names, similar to the TabSeparatedWithNames
format.
Example Usage
Inserting Data
Using a JSON file with the following data, named as football.json
:
Insert the data:
Reading Data
Read data using the JSONCompactEachRowWithNames
format:
The output will be in JSON format:
Format Settings
note
If setting input_format_with_names_use_header
is set to 1,
the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting input_format_skip_unknown_fields
is set to 1.
Otherwise, the first row will be skipped.