forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathFormatFactorySettings.h
More file actions
1369 lines (1196 loc) · 67.9 KB
/
FormatFactorySettings.h
File metadata and controls
1369 lines (1196 loc) · 67.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#pragma once
/// This header exists so we can share it between multiple setting objects that include format settings
#include <Core/SettingsObsoleteMacros.h>
#include <Core/SettingsFields.h>
#include <Core/Defines.h>
// clang-format off
#if defined(__CLION_IDE__)
/// CLion freezes for a minute every time it processes this
#define FORMAT_FACTORY_SETTINGS(M, ALIAS)
#define OBSOLETE_FORMAT_SETTINGS(M, ALIAS)
#else
#define FORMAT_FACTORY_SETTINGS(DECLARE, ALIAS) \
DECLARE(Char, format_csv_delimiter, ',', R"(
The character to be considered as a delimiter in CSV data. If setting with a string, a string has to have a length of 1.
)", 0) \
DECLARE(Bool, format_csv_allow_single_quotes, false, R"(
If it is set to true, allow strings in single quotes.
)", 0) \
DECLARE(Bool, format_csv_allow_double_quotes, true, R"(
If it is set to true, allow strings in double quotes.
)", 0) \
DECLARE(Bool, output_format_csv_serialize_tuple_into_separate_columns, true, R"(
If it set to true, then Tuples in CSV format are serialized as separate columns (that is, their nesting in the tuple is lost)
)", 0) \
DECLARE(Bool, input_format_csv_deserialize_separate_columns_into_tuple, true, R"(
If it set to true, then separate columns written in CSV format can be deserialized to Tuple column.
)", 0) \
DECLARE(Bool, output_format_csv_crlf_end_of_line, false, R"(
If it is set true, end of line in CSV format will be \\r\\n instead of \\n.
)", 0) \
DECLARE(Bool, input_format_csv_allow_cr_end_of_line, false, R"(
If it is set true, \\r will be allowed at end of line not followed by \\n
)", 0) \
DECLARE(Bool, input_format_csv_enum_as_number, false, R"(
Treat inserted enum values in CSV formats as enum indices
)", 0) \
DECLARE(Bool, input_format_csv_arrays_as_nested_csv, false, R"(
When reading Array from CSV, expect that its elements were serialized in nested CSV and then put into string. Example: \"[\"\"Hello\"\", \"\"world\"\", \"\"42\"\"\"\" TV\"\"]\". Braces around array can be omitted.
)", 0) \
DECLARE(Bool, input_format_skip_unknown_fields, true, R"(
Enables or disables skipping insertion of extra data.
When writing data, ClickHouse throws an exception if input data contain columns that do not exist in the target table. If skipping is enabled, ClickHouse does not insert extra data and does not throw an exception.
Supported formats:
- [JSONEachRow](/interfaces/formats/JSONEachRow) (and other JSON formats)
- [BSONEachRow](/interfaces/formats/BSONEachRow) (and other JSON formats)
- [TSKV](/interfaces/formats/TSKV)
- All formats with suffixes WithNames/WithNamesAndTypes
- [MySQLDump](/interfaces/formats/MySQLDump)
- [Native](/interfaces/formats/Native)
Possible values:
- 0 — Disabled.
- 1 — Enabled.
)", 0) \
DECLARE(Bool, input_format_with_names_use_header, true, R"(
Enables or disables checking the column order when inserting data.
To improve insert performance, we recommend disabling this check if you are sure that the column order of the input data is the same as in the target table.
Supported formats:
- [CSVWithNames](/interfaces/formats/CSVWithNames)
- [CSVWithNamesAndTypes](/interfaces/formats/CSVWithNamesAndTypes)
- [TabSeparatedWithNames](/interfaces/formats/TabSeparatedWithNames)
- [TabSeparatedWithNamesAndTypes](/interfaces/formats/TabSeparatedWithNamesAndTypes)
- [JSONCompactEachRowWithNames](/interfaces/formats/JSONCompactEachRowWithNames)
- [JSONCompactEachRowWithNamesAndTypes](/interfaces/formats/JSONCompactEachRowWithNamesAndTypes)
- [JSONCompactStringsEachRowWithNames](/interfaces/formats/JSONCompactStringsEachRowWithNames)
- [JSONCompactStringsEachRowWithNamesAndTypes](/interfaces/formats/JSONCompactStringsEachRowWithNamesAndTypes)
- [RowBinaryWithNames](/interfaces/formats/RowBinaryWithNames)
- [RowBinaryWithNamesAndTypes](/interfaces/formats/RowBinaryWithNamesAndTypes)
- [CustomSeparatedWithNames](/interfaces/formats/CustomSeparatedWithNames)
- [CustomSeparatedWithNamesAndTypes](/interfaces/formats/CustomSeparatedWithNamesAndTypes)
Possible values:
- 0 — Disabled.
- 1 — Enabled.
)", 0) \
DECLARE(Bool, input_format_with_types_use_header, true, R"(
Controls whether format parser should check if data types from the input data match data types from the target table.
Supported formats:
- [CSVWithNamesAndTypes](/interfaces/formats/CSVWithNamesAndTypes)
- [TabSeparatedWithNamesAndTypes](/interfaces/formats/TabSeparatedWithNamesAndTypes)
- [JSONCompactEachRowWithNamesAndTypes](/interfaces/formats/JSONCompactEachRowWithNamesAndTypes)
- [JSONCompactStringsEachRowWithNamesAndTypes](/interfaces/formats/JSONCompactStringsEachRowWithNamesAndTypes)
- [RowBinaryWithNamesAndTypes](/interfaces/formats/RowBinaryWithNamesAndTypes)
- [CustomSeparatedWithNamesAndTypes](/interfaces/formats/CustomSeparatedWithNamesAndTypes)
Possible values:
- 0 — Disabled.
- 1 — Enabled.
)", 0) \
DECLARE(Bool, input_format_import_nested_json, false, R"(
Enables or disables the insertion of JSON data with nested objects.
Supported formats:
- [JSONEachRow](/interfaces/formats/JSONEachRow)
Possible values:
- 0 — Disabled.
- 1 — Enabled.
See also:
- [Usage of Nested Structures](/integrations/data-formats/json/other-formats#accessing-nested-json-objects) with the `JSONEachRow` format.
)", 0) \
DECLARE(Bool, input_format_defaults_for_omitted_fields, true, R"(
When performing `INSERT` queries, replace omitted input column values with default values of the respective columns. This option applies to [JSONEachRow](/interfaces/formats/JSONEachRow) (and other JSON formats), [CSV](/interfaces/formats/CSV), [TabSeparated](/interfaces/formats/TabSeparated), [TSKV](/interfaces/formats/TSKV), [Parquet](/interfaces/formats/Parquet), [Arrow](/interfaces/formats/Arrow), [Avro](/interfaces/formats/Avro), [ORC](/interfaces/formats/ORC), [Native](/interfaces/formats/Native) formats and formats with `WithNames`/`WithNamesAndTypes` suffixes.
:::note
When this option is enabled, extended table metadata are sent from server to client. It consumes additional computing resources on the server and can reduce performance.
:::
Possible values:
- 0 — Disabled.
- 1 — Enabled.
)", IMPORTANT) \
DECLARE(Bool, input_format_csv_empty_as_default, true, R"(
Treat empty fields in CSV input as default values.
)", 0) \
DECLARE(Bool, input_format_tsv_empty_as_default, false, R"(
Treat empty fields in TSV input as default values.
)", 0) \
DECLARE(Bool, input_format_tsv_enum_as_number, false, R"(
Treat inserted enum values in TSV formats as enum indices.
)", 0) \
DECLARE(Bool, input_format_null_as_default, true, R"(
Enables or disables the initialization of [NULL](/sql-reference/syntax#literals) fields with [default values](/sql-reference/statements/create/table#default_values), if data type of these fields is not [nullable](/sql-reference/data-types/nullable).
If column type is not nullable and this setting is disabled, then inserting `NULL` causes an exception. If column type is nullable, then `NULL` values are inserted as is, regardless of this setting.
This setting is applicable for most input formats.
For complex default expressions `input_format_defaults_for_omitted_fields` must be enabled too.
Possible values:
- 0 — Inserting `NULL` into a not nullable column causes an exception.
- 1 — `NULL` fields are initialized with default column values.
)", 0) \
DECLARE(Bool, input_format_force_null_for_omitted_fields, false, R"(
Force initialize omitted fields with null values
)", 0) \
DECLARE(Bool, input_format_arrow_case_insensitive_column_matching, false, R"(
Ignore case when matching Arrow columns with CH columns.
)", 0) \
DECLARE(Int64, input_format_orc_row_batch_size, 100'000, R"(
Batch size when reading ORC stripes.
)", 0) \
DECLARE(Bool, input_format_orc_case_insensitive_column_matching, false, R"(
Ignore case when matching ORC columns with CH columns.
)", 0) \
DECLARE(Bool, input_format_parquet_case_insensitive_column_matching, false, R"(
Ignore case when matching Parquet columns with CH columns.
)", 0) \
DECLARE(Bool, input_format_parquet_preserve_order, false, R"(
Avoid reordering rows when reading from Parquet files. Usually makes it much slower.
)", 0) \
DECLARE(Bool, input_format_parquet_filter_push_down, true, R"(
When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and min/max statistics in the Parquet metadata.
)", 0) \
DECLARE(Bool, input_format_parquet_bloom_filter_push_down, true, R"(
When reading Parquet files, skip whole row groups based on the WHERE expressions and bloom filter in the Parquet metadata.
)", 0) \
DECLARE(Bool, input_format_parquet_use_native_reader, false, R"(
When reading Parquet files, to use native reader instead of arrow reader.
)", 0) \
DECLARE(Bool, input_format_parquet_enable_json_parsing, true, R"(
When reading Parquet files, parse JSON columns as ClickHouse JSON Column.
)", 0) \
DECLARE(Bool, input_format_allow_seeks, true, R"(
Allow seeks while reading in ORC/Parquet/Arrow input formats.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_orc_allow_missing_columns, true, R"(
Allow missing columns while reading ORC input formats
)", 0) \
DECLARE(Bool, input_format_orc_use_fast_decoder, true, R"(
Use a faster ORC decoder implementation.
)", 0) \
DECLARE(Bool, input_format_orc_filter_push_down, true, R"(
When reading ORC files, skip whole stripes or row groups based on the WHERE/PREWHERE expressions, min/max statistics or bloom filter in the ORC metadata.
)", 0) \
DECLARE(String, input_format_orc_reader_time_zone_name, "GMT", R"(
The time zone name for ORC row reader, the default ORC row reader's time zone is GMT.
)", 0) \
DECLARE(Bool, input_format_orc_dictionary_as_low_cardinality, true, R"(
Treat ORC dictionary encoded columns as LowCardinality columns while reading ORC files.
)", 0) \
DECLARE(Bool, input_format_parquet_allow_missing_columns, true, R"(
Allow missing columns while reading Parquet input formats
)", 0) \
DECLARE(UInt64, input_format_parquet_local_file_min_bytes_for_seek, 8192, R"(
Min bytes required for local read (file) to do seek, instead of read with ignore in Parquet input format
)", 0) \
DECLARE(Bool, input_format_parquet_enable_row_group_prefetch, true, R"(
Enable row group prefetching during parquet parsing. Currently, only single-threaded parsing can prefetch.
)", 0) \
DECLARE(Bool, input_format_arrow_allow_missing_columns, true, R"(
Allow missing columns while reading Arrow input formats
)", 0) \
DECLARE(Char, input_format_hive_text_fields_delimiter, '\x01', R"(
Delimiter between fields in Hive Text File
)", 0) \
DECLARE(Char, input_format_hive_text_collection_items_delimiter, '\x02', R"(
Delimiter between collection(array or map) items in Hive Text File
)", 0) \
DECLARE(Char, input_format_hive_text_map_keys_delimiter, '\x03', R"(
Delimiter between a pair of map key/values in Hive Text File
)", 0) \
DECLARE(Bool, input_format_hive_text_allow_variable_number_of_columns, true, R"(
Ignore extra columns in Hive Text input (if file has more columns than expected) and treat missing fields in Hive Text input as default values
)", 0) \
DECLARE(UInt64, input_format_msgpack_number_of_columns, 0, R"(
The number of columns in inserted MsgPack data. Used for automatic schema inference from data.
)", 0) \
DECLARE(MsgPackUUIDRepresentation, output_format_msgpack_uuid_representation, FormatSettings::MsgPackUUIDRepresentation::EXT, R"(
The way how to output UUID in MsgPack format.
)", 0) \
DECLARE(UInt64, input_format_max_rows_to_read_for_schema_inference, 25000, R"(
The maximum rows of data to read for automatic schema inference.
)", 0) \
DECLARE(UInt64, input_format_max_bytes_to_read_for_schema_inference, 32 * 1024 * 1024, R"(
The maximum amount of data in bytes to read for automatic schema inference.
)", 0) \
DECLARE(Bool, input_format_csv_use_best_effort_in_schema_inference, true, R"(
Use some tweaks and heuristics to infer schema in CSV format
)", 0) \
DECLARE(Bool, input_format_csv_try_infer_numbers_from_strings, false, R"(
If enabled, during schema inference ClickHouse will try to infer numbers from string fields.
It can be useful if CSV data contains quoted UInt64 numbers.
Disabled by default.
)", 0) \
DECLARE(Bool, input_format_csv_try_infer_strings_from_quoted_tuples, true, R"(
Interpret quoted tuples in the input data as a value of type String.
)", 0) \
DECLARE(Bool, input_format_tsv_use_best_effort_in_schema_inference, true, R"(
Use some tweaks and heuristics to infer schema in TSV format
)", 0) \
DECLARE(Bool, input_format_csv_detect_header, true, R"(
Automatically detect header with names and types in CSV format
)", 0) \
DECLARE(Bool, input_format_csv_allow_whitespace_or_tab_as_delimiter, false, R"(
Allow to use spaces and tabs(\\t) as field delimiter in the CSV strings
)", 0) \
DECLARE(Bool, input_format_csv_trim_whitespaces, true, R"(
Trims spaces and tabs (\\t) characters at the beginning and end in CSV strings
)", 0) \
DECLARE(Bool, input_format_csv_use_default_on_bad_values, false, R"(
Allow to set default value to column when CSV field deserialization failed on bad value
)", 0) \
DECLARE(Bool, input_format_csv_allow_variable_number_of_columns, false, R"(
Ignore extra columns in CSV input (if file has more columns than expected) and treat missing fields in CSV input as default values
)", 0) \
DECLARE(Bool, input_format_tsv_allow_variable_number_of_columns, false, R"(
Ignore extra columns in TSV input (if file has more columns than expected) and treat missing fields in TSV input as default values
)", 0) \
DECLARE(Bool, input_format_custom_allow_variable_number_of_columns, false, R"(
Ignore extra columns in CustomSeparated input (if file has more columns than expected) and treat missing fields in CustomSeparated input as default values
)", 0) \
DECLARE(Bool, input_format_json_compact_allow_variable_number_of_columns, false, R"(
Allow variable number of columns in rows in JSONCompact/JSONCompactEachRow input formats.
Ignore extra columns in rows with more columns than expected and treat missing columns as default values.
Disabled by default.
)", 0) \
DECLARE(Bool, input_format_tsv_detect_header, true, R"(
Automatically detect header with names and types in TSV format
)", 0) \
DECLARE(Bool, input_format_custom_detect_header, true, R"(
Automatically detect header with names and types in CustomSeparated format
)", 0) \
DECLARE(Bool, input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference, false, R"(
Skip columns with unsupported types while schema inference for format Parquet
)", 0) \
DECLARE(NonZeroUInt64, input_format_parquet_max_block_size, DEFAULT_BLOCK_SIZE, R"(
Max block size for parquet reader.
)", 0) \
DECLARE(UInt64, input_format_parquet_prefer_block_bytes, DEFAULT_BLOCK_SIZE * 256, R"(
Average block bytes output by parquet reader
)", 0) \
DECLARE(Bool, input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference, false, R"(
Skip fields with unsupported types while schema inference for format Protobuf
)", 0) \
DECLARE(Bool, input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference, false, R"(
Skip columns with unsupported types while schema inference for format CapnProto
)", 0) \
DECLARE(Bool, input_format_orc_skip_columns_with_unsupported_types_in_schema_inference, false, R"(
Skip columns with unsupported types while schema inference for format ORC
)", 0) \
DECLARE(Bool, input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference, false, R"(
Skip columns with unsupported types while schema inference for format Arrow
)", 0) \
DECLARE(String, column_names_for_schema_inference, "", R"(
The list of column names to use in schema inference for formats without column names. The format: 'column1,column2,column3,...'
)", 0) \
DECLARE(String, schema_inference_hints, "", R"(
The list of column names and types to use as hints in schema inference for formats without schema.
Example:
Query:
```sql
desc format(JSONEachRow, '{"x" : 1, "y" : "String", "z" : "0.0.0.0" }') settings schema_inference_hints='x UInt8, z IPv4';
```
Result:
```sql
x UInt8
y Nullable(String)
z IPv4
```
:::note
If the `schema_inference_hints` is not formatted properly, or if there is a typo or a wrong datatype, etc... the whole schema_inference_hints will be ignored.
:::
)", 0) \
DECLARE(SchemaInferenceMode, schema_inference_mode, "default", R"(
Mode of schema inference. 'default' - assume that all files have the same schema and schema can be inferred from any file, 'union' - files can have different schemas and the resulting schema should be the a union of schemas of all files
)", 0) \
DECLARE(UInt64Auto, schema_inference_make_columns_nullable, 1, R"(
Controls making inferred types `Nullable` in schema inference.
If the setting is enabled, all inferred type will be `Nullable`, if disabled, the inferred type will never be `Nullable`, if set to `auto`, the inferred type will be `Nullable` only if the column contains `NULL` in a sample that is parsed during schema inference or file metadata contains information about column nullability.
)", 0) \
DECLARE(Bool, schema_inference_make_json_columns_nullable, 0, R"(
Controls making inferred JSON types `Nullable` in schema inference.
If this setting is enabled together with schema_inference_make_columns_nullable, inferred JSON type will be `Nullable`.
)", 0) \
DECLARE(Bool, input_format_json_read_bools_as_numbers, true, R"(
Allow parsing bools as numbers in JSON input formats.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_read_bools_as_strings, true, R"(
Allow parsing bools as strings in JSON input formats.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_try_infer_numbers_from_strings, false, R"(
If enabled, during schema inference ClickHouse will try to infer numbers from string fields.
It can be useful if JSON data contains quoted UInt64 numbers.
Disabled by default.
)", 0) \
DECLARE(Bool, input_format_json_validate_types_from_metadata, true, R"(
For JSON/JSONCompact/JSONColumnsWithMetadata input formats, if this setting is set to 1,
the types from metadata in input data will be compared with the types of the corresponding columns from the table.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_read_numbers_as_strings, true, R"(
Allow parsing numbers as strings in JSON input formats.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_read_objects_as_strings, true, R"(
Allow parsing JSON objects as strings in JSON input formats.
Example:
```sql
SET input_format_json_read_objects_as_strings = 1;
CREATE TABLE test (id UInt64, obj String, date Date) ENGINE=Memory();
INSERT INTO test FORMAT JSONEachRow {"id" : 1, "obj" : {"a" : 1, "b" : "Hello"}, "date" : "2020-01-01"};
SELECT * FROM test;
```
Result:
```
┌─id─┬─obj──────────────────────┬───────date─┐
│ 1 │ {"a" : 1, "b" : "Hello"} │ 2020-01-01 │
└────┴──────────────────────────┴────────────┘
```
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_read_arrays_as_strings, true, R"(
Allow parsing JSON arrays as strings in JSON input formats.
Example:
```sql
SET input_format_json_read_arrays_as_strings = 1;
SELECT arr, toTypeName(arr), JSONExtractArrayRaw(arr)[3] from format(JSONEachRow, 'arr String', '{"arr" : [1, "Hello", [1,2,3]]}');
```
Result:
```
┌─arr───────────────────┬─toTypeName(arr)─┬─arrayElement(JSONExtractArrayRaw(arr), 3)─┐
│ [1, "Hello", [1,2,3]] │ String │ [1,2,3] │
└───────────────────────┴─────────────────┴───────────────────────────────────────────┘
```
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_try_infer_named_tuples_from_objects, true, R"(
If enabled, during schema inference ClickHouse will try to infer named Tuple from JSON objects.
The resulting named Tuple will contain all elements from all corresponding JSON objects from sample data.
Example:
```sql
SET input_format_json_try_infer_named_tuples_from_objects = 1;
DESC format(JSONEachRow, '{"obj" : {"a" : 42, "b" : "Hello"}}, {"obj" : {"a" : 43, "c" : [1, 2, 3]}}, {"obj" : {"d" : {"e" : 42}}}')
```
Result:
```
┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ obj │ Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Tuple(e Nullable(Int64))) │ │ │ │ │ │
└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘
```
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects, false, R"(
Use String type instead of an exception in case of ambiguous paths in JSON objects during named tuples inference
)", 0) \
DECLARE(Bool, input_format_json_infer_incomplete_types_as_strings, true, R"(
Allow to use String type for JSON keys that contain only `Null`/`{}`/`[]` in data sample during schema inference.
In JSON formats any value can be read as String, and we can avoid errors like `Cannot determine type for column 'column_name' by first 25000 rows of data, most likely this column contains only Nulls or empty Arrays/Maps` during schema inference
by using String type for keys with unknown types.
Example:
```sql
SET input_format_json_infer_incomplete_types_as_strings = 1, input_format_json_try_infer_named_tuples_from_objects = 1;
DESCRIBE format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}');
SELECT * FROM format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}');
```
Result:
```
┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ obj │ Tuple(a Array(Nullable(Int64)), b Nullable(String), c Nullable(String), d Nullable(String), e Array(Nullable(String))) │ │ │ │ │ │
└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘
┌─obj────────────────────────────┐
│ ([1,2,3],'hello',NULL,'{}',[]) │
└────────────────────────────────┘
```
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_named_tuples_as_objects, true, R"(
Parse named tuple columns as JSON objects.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_ignore_unknown_keys_in_named_tuple, true, R"(
Ignore unknown keys in json object for named tuples.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_defaults_for_missing_elements_in_named_tuple, true, R"(
Insert default values for missing elements in JSON object while parsing named tuple.
This setting works only when setting `input_format_json_named_tuples_as_objects` is enabled.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_throw_on_bad_escape_sequence, true, R"(
Throw an exception if JSON string contains bad escape sequence in JSON input formats. If disabled, bad escape sequences will remain as is in the data.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_json_ignore_unnecessary_fields, true, R"(
Ignore unnecessary fields and not parse them. Enabling this may not throw exceptions on json strings of invalid format or with duplicated fields
)", 0) \
DECLARE(Bool, input_format_try_infer_variants, false, R"(
If enabled, ClickHouse will try to infer type [`Variant`](../../sql-reference/data-types/variant.md) in schema inference for text formats when there is more than one possible type for column/array elements.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
)", 0) \
DECLARE(Bool, type_json_skip_duplicated_paths, false, R"(
When enabled, during parsing JSON object into JSON type duplicated paths will be ignored and only the first one will be inserted instead of an exception
)", 0) \
DECLARE(UInt64, input_format_json_max_depth, 1000, R"(
Maximum depth of a field in JSON. This is not a strict limit, it does not have to be applied precisely.
)", 0) \
DECLARE(Bool, input_format_json_empty_as_default, false, R"(
When enabled, replace empty input fields in JSON with default values. For complex default expressions `input_format_defaults_for_omitted_fields` must be enabled too.
Possible values:
+ 0 — Disable.
+ 1 — Enable.
)", 0) \
DECLARE(Bool, input_format_try_infer_integers, true, R"(
If enabled, ClickHouse will try to infer integers instead of floats in schema inference for text formats. If all numbers in the column from input data are integers, the result type will be `Int64`, if at least one number is float, the result type will be `Float64`.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_try_infer_dates, true, R"(
If enabled, ClickHouse will try to infer type `Date` from string fields in schema inference for text formats. If all fields from a column in input data were successfully parsed as dates, the result type will be `Date`, if at least one field was not parsed as date, the result type will be `String`.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_try_infer_datetimes, true, R"(
If enabled, ClickHouse will try to infer type `DateTime64` from string fields in schema inference for text formats. If all fields from a column in input data were successfully parsed as datetimes, the result type will be `DateTime64`, if at least one field was not parsed as datetime, the result type will be `String`.
Enabled by default.
)", 0) \
DECLARE(Bool, input_format_try_infer_datetimes_only_datetime64, false, R"(
When input_format_try_infer_datetimes is enabled, infer only DateTime64 but not DateTime types
)", 0) \
DECLARE(Bool, input_format_try_infer_exponent_floats, false, R"(
Try to infer floats in exponential notation while schema inference in text formats (except JSON, where exponent numbers are always inferred)
)", 0) \
DECLARE(Bool, output_format_markdown_escape_special_characters, false, R"(
When enabled, escape special characters in Markdown.
[Common Mark](https://spec.commonmark.org/0.30/#example-12) defines the following special characters that can be escaped by \:
```
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
```
Possible values:
+ 0 — Disable.
+ 1 — Enable.
)", 0) \
DECLARE(Bool, input_format_protobuf_flatten_google_wrappers, false, R"(
Enable Google wrappers for regular non-nested columns, e.g. google.protobuf.StringValue 'str' for String column 'str'. For Nullable columns empty wrappers are recognized as defaults, and missing as nulls
)", 0) \
DECLARE(Bool, output_format_protobuf_nullables_with_google_wrappers, false, R"(
When serializing Nullable columns with Google wrappers, serialize default values as empty wrappers. If turned off, default and null values are not serialized
)", 0) \
DECLARE(UInt64, input_format_csv_skip_first_lines, 0, R"(
Skip specified number of lines at the beginning of data in CSV format
)", 0) \
DECLARE(UInt64, input_format_tsv_skip_first_lines, 0, R"(
Skip specified number of lines at the beginning of data in TSV format
)", 0) \
DECLARE(Bool, input_format_csv_skip_trailing_empty_lines, false, R"(
Skip trailing empty lines in CSV format
)", 0) \
DECLARE(Bool, input_format_tsv_skip_trailing_empty_lines, false, R"(
Skip trailing empty lines in TSV format
)", 0) \
DECLARE(Bool, input_format_custom_skip_trailing_empty_lines, false, R"(
Skip trailing empty lines in CustomSeparated format
)", 0) \
DECLARE(Bool, input_format_tsv_crlf_end_of_line, false, R"(
If it is set true, file function will read TSV format with \\r\\n instead of \\n.
)", 0) \
\
DECLARE(Bool, input_format_native_allow_types_conversion, true, R"(
Allow data types conversion in Native input format
)", 0) \
DECLARE(Bool, input_format_native_decode_types_in_binary_format, false, R"(
Read data types in binary format instead of type names in Native input format
)", 0) \
DECLARE(Bool, output_format_native_encode_types_in_binary_format, false, R"(
Write data types in binary format instead of type names in Native output format
)", 0) \
DECLARE(Bool, output_format_native_write_json_as_string, false, R"(
Write data of [JSON](../../sql-reference/data-types/newjson.md) column as [String](../../sql-reference/data-types/string.md) column containing JSON strings instead of default native JSON serialization.
)", 0) \
DECLARE(Bool, output_format_native_use_flattened_dynamic_and_json_serialization, false, R"(
Write data of [JSON](../../sql-reference/data-types/newjson.md) and [Dynamic](../../sql-reference/data-types/dynamic.md) columns in a flattened format (all types/paths as separate subcolumns).
)", 0) \
\
DECLARE(DateTimeInputFormat, date_time_input_format, FormatSettings::DateTimeInputFormat::Basic, R"(
Allows choosing a parser of the text representation of date and time.
The setting does not apply to [date and time functions](../../sql-reference/functions/date-time-functions.md).
Possible values:
- `'best_effort'` — Enables extended parsing.
ClickHouse can parse the basic `YYYY-MM-DD HH:MM:SS` format and all [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time formats. For example, `'2018-06-08T01:02:03.000Z'`.
- `'best_effort_us'` — Similar to `best_effort` (see the difference in [parseDateTimeBestEffortUS](../../sql-reference/functions/type-conversion-functions#parsedatetimebesteffortus)
- `'basic'` — Use basic parser.
ClickHouse can parse only the basic `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DD` format. For example, `2019-08-20 10:18:56` or `2019-08-20`.
Cloud default value: `'best_effort'`.
See also:
- [DateTime data type.](../../sql-reference/data-types/datetime.md)
- [Functions for working with dates and times.](../../sql-reference/functions/date-time-functions.md)
)", 0) \
DECLARE(DateTimeOutputFormat, date_time_output_format, FormatSettings::DateTimeOutputFormat::Simple, R"(
Allows choosing different output formats of the text representation of date and time.
Possible values:
- `simple` - Simple output format.
ClickHouse output date and time `YYYY-MM-DD hh:mm:ss` format. For example, `2019-08-20 10:18:56`. The calculation is performed according to the data type's time zone (if present) or server time zone.
- `iso` - ISO output format.
ClickHouse output date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) `YYYY-MM-DDThh:mm:ssZ` format. For example, `2019-08-20T10:18:56Z`. Note that output is in UTC (`Z` means UTC).
- `unix_timestamp` - Unix timestamp output format.
ClickHouse output date and time in [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) format. For example `1566285536`.
See also:
- [DateTime data type.](../../sql-reference/data-types/datetime.md)
- [Functions for working with dates and times.](../../sql-reference/functions/date-time-functions.md)
)", 0) \
DECLARE(IntervalOutputFormat, interval_output_format, FormatSettings::IntervalOutputFormat::Numeric, R"(
Allows choosing different output formats of the text representation of interval types.
Possible values:
- `kusto` - KQL-style output format.
ClickHouse outputs intervals in [KQL format](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier). For example, `toIntervalDay(2)` would be formatted as `2.00:00:00`. Please note that for interval types of varying length (ie. `IntervalMonth` and `IntervalYear`) the average number of seconds per interval is taken into account.
- `numeric` - Numeric output format.
ClickHouse outputs intervals as their underlying numeric representation. For example, `toIntervalDay(2)` would be formatted as `2`.
See also:
- [Interval](../../sql-reference/data-types/special-data-types/interval.md)
)", 0) \
\
DECLARE(Bool, date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands, false, R"(
Dynamically trim the trailing zeros of datetime64 values to adjust the output scale to [0, 3, 6],
corresponding to 'seconds', 'milliseconds', and 'microseconds')", 0) \
DECLARE(Bool, input_format_ipv4_default_on_conversion_error, false, R"(
Deserialization of IPv4 will use default values instead of throwing exception on conversion error.
Disabled by default.
)", 0) \
DECLARE(Bool, input_format_ipv6_default_on_conversion_error, false, R"(
Deserialization of IPV6 will use default values instead of throwing exception on conversion error.
Disabled by default.
)", 0) \
DECLARE(String, bool_true_representation, "true", R"(
Text to represent true bool value in TSV/CSV/Vertical/Pretty formats.
)", 0) \
DECLARE(String, bool_false_representation, "false", R"(
Text to represent false bool value in TSV/CSV/Vertical/Pretty formats.
)", 0) \
\
DECLARE(Bool, allow_special_bool_values_inside_variant, false, R"(
Allows to parse Bool values inside Variant type from special text bool values like "on", "off", "enable", "disable", etc.
)", 0) \
\
DECLARE(Bool, input_format_values_interpret_expressions, true, R"(
For Values format: if the field could not be parsed by streaming parser, run SQL parser and try to interpret it as SQL expression.
)", 0) \
DECLARE(Bool, input_format_values_deduce_templates_of_expressions, true, R"(
For Values format: if the field could not be parsed by streaming parser, run SQL parser, deduce template of the SQL expression, try to parse all rows using template and then interpret expression for all rows.
)", 0) \
DECLARE(Bool, input_format_values_accurate_types_of_literals, true, R"(
For Values format: when parsing and interpreting expressions using template, check actual type of literal to avoid possible overflow and precision issues.
)", 0) \
DECLARE(Bool, input_format_avro_allow_missing_fields, false, R"(
For Avro/AvroConfluent format: when field is not found in schema use default value instead of error
)", 0) \
/** This setting is obsolete and do nothing, left for compatibility reasons. */ \
DECLARE(Bool, input_format_avro_null_as_default, false, R"(
For Avro/AvroConfluent format: insert default in case of null and non Nullable column
)", 0) \
DECLARE(UInt64, format_binary_max_string_size, 1_GiB, R"(
The maximum allowed size for String in RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit
)", 0) \
DECLARE(UInt64, format_binary_max_array_size, 1_GiB, R"(
The maximum allowed size for Array in RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit
)", 0) \
DECLARE(Bool, input_format_binary_decode_types_in_binary_format, false, R"(
Read data types in binary format instead of type names in RowBinaryWithNamesAndTypes input format
)", 0) \
DECLARE(Bool, output_format_binary_encode_types_in_binary_format, false, R"(
Write data types in binary format instead of type names in RowBinaryWithNamesAndTypes output format
)", 0) \
DECLARE(URI, format_avro_schema_registry_url, "", R"(
For AvroConfluent format: Confluent Schema Registry URL.
)", 0) \
DECLARE(Bool, input_format_binary_read_json_as_string, false, R"(
Read values of [JSON](../../sql-reference/data-types/newjson.md) data type as JSON [String](../../sql-reference/data-types/string.md) values in RowBinary input format.
)", 0) \
DECLARE(Bool, output_format_binary_write_json_as_string, false, R"(
Write values of [JSON](../../sql-reference/data-types/newjson.md) data type as JSON [String](../../sql-reference/data-types/string.md) values in RowBinary output format.
)", 0) \
\
DECLARE(Bool, output_format_json_quote_64bit_integers, true, R"(
Controls quoting of 64-bit or bigger [integers](../../sql-reference/data-types/int-uint.md) (like `UInt64` or `Int128`) when they are output in a [JSON](/interfaces/formats/JSON) format.
Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations.
Possible values:
- 0 — Integers are output without quotes.
- 1 — Integers are enclosed in quotes.
)", 0) \
DECLARE(Bool, output_format_json_quote_denormals, false, R"str(
Enables `+nan`, `-nan`, `+inf`, `-inf` outputs in [JSON](/interfaces/formats/JSON) output format.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
**Example**
Consider the following table `account_orders`:
```text
┌─id─┬─name───┬─duration─┬─period─┬─area─┐
│ 1 │ Andrew │ 20 │ 0 │ 400 │
│ 2 │ John │ 40 │ 0 │ 0 │
│ 3 │ Bob │ 15 │ 0 │ -100 │
└────┴────────┴──────────┴────────┴──────┘
```
When `output_format_json_quote_denormals = 0`, the query returns `null` values in output:
```sql
SELECT area/period FROM account_orders FORMAT JSON;
```
```json
{
"meta":
[
{
"name": "divide(area, period)",
"type": "Float64"
}
],
"data":
[
{
"divide(area, period)": null
},
{
"divide(area, period)": null
},
{
"divide(area, period)": null
}
],
"rows": 3,
"statistics":
{
"elapsed": 0.003648093,
"rows_read": 3,
"bytes_read": 24
}
}
```
When `output_format_json_quote_denormals = 1`, the query returns:
```json
{
"meta":
[
{
"name": "divide(area, period)",
"type": "Float64"
}
],
"data":
[
{
"divide(area, period)": "inf"
},
{
"divide(area, period)": "-nan"
},
{
"divide(area, period)": "-inf"
}
],
"rows": 3,
"statistics":
{
"elapsed": 0.000070241,
"rows_read": 3,
"bytes_read": 24
}
}
```
)str", 0) \
DECLARE(Bool, output_format_json_quote_decimals, false, R"(
Controls quoting of decimals in JSON output formats.
Disabled by default.
)", 0) \
DECLARE(Bool, output_format_json_quote_64bit_floats, false, R"(
Controls quoting of 64-bit [floats](../../sql-reference/data-types/float.md) when they are output in JSON* formats.
Disabled by default.
)", 0) \
\
DECLARE(Bool, output_format_json_escape_forward_slashes, true, R"(
Controls escaping forward slashes for string outputs in JSON output format. This is intended for compatibility with JavaScript. Don't confuse with backslashes that are always escaped.
Enabled by default.
)", 0) \
DECLARE(Bool, output_format_json_named_tuples_as_objects, true, R"(
Serialize named tuple columns as JSON objects.
Enabled by default.
)", 0) \
DECLARE(Bool, output_format_json_skip_null_value_in_named_tuples, false, R"(
Skip key value pairs with null value when serialize named tuple columns as JSON objects. It is only valid when output_format_json_named_tuples_as_objects is true.
)", 0) \
DECLARE(Bool, output_format_json_array_of_rows, false, R"(
Enables the ability to output all rows as a JSON array in the [JSONEachRow](/interfaces/formats/JSONEachRow) format.
Possible values:
- 1 — ClickHouse outputs all rows as an array, each row in the `JSONEachRow` format.
- 0 — ClickHouse outputs each row separately in the `JSONEachRow` format.
**Example of a query with the enabled setting**
Query:
```sql
SET output_format_json_array_of_rows = 1;
SELECT number FROM numbers(3) FORMAT JSONEachRow;
```
Result:
```text
[
{"number":"0"},
{"number":"1"},
{"number":"2"}
]
```
**Example of a query with the disabled setting**
Query:
```sql
SET output_format_json_array_of_rows = 0;
SELECT number FROM numbers(3) FORMAT JSONEachRow;
```
Result:
```text
{"number":"0"}
{"number":"1"}
{"number":"2"}
```
)", 0) \
DECLARE(Bool, output_format_json_validate_utf8, false, R"(
Controls validation of UTF-8 sequences in JSON output formats, doesn't impact formats JSON/JSONCompact/JSONColumnsWithMetadata, they always validate UTF-8.
Disabled by default.
)", 0) \
DECLARE(Bool, output_format_json_pretty_print, true, R"(
When enabled, values of complex data types like Tuple/Array/Map in JSON output format in 'data' section will be printed in pretty format.
Enabled by default.
)", 0) \
\
DECLARE(String, format_json_object_each_row_column_for_object_name, "", R"(
The name of column that will be used for storing/writing object names in [JSONObjectEachRow](/interfaces/formats/JSONObjectEachRow) format.
Column type should be String. If value is empty, default names `row_{i}`will be used for object names.
)", 0) \
\
DECLARE(UInt64, output_format_pretty_max_rows, 1000, R"(
Rows limit for Pretty formats.
)", 0) \
DECLARE(UInt64, output_format_pretty_max_column_pad_width, 250, R"(
Maximum width to pad all values in a column in Pretty formats.
)", 0) \
DECLARE(UInt64, output_format_pretty_max_column_name_width_cut_to, 24, R"(
If the column name is too long, cut it to this length.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.
)", 0) \
DECLARE(UInt64, output_format_pretty_max_column_name_width_min_chars_to_cut, 4, R"(
Minimum characters to cut if the column name is too long.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.
)", 0) \
DECLARE(UInt64, output_format_pretty_max_value_width, 10000, R"(
Maximum width of value to display in Pretty formats. If greater - it will be cut.
The value 0 means - never cut.
)", 0) \
DECLARE(UInt64, output_format_pretty_max_value_width_apply_for_single_value, false, R"(
Only cut values (see the `output_format_pretty_max_value_width` setting) when it is not a single value in a block. Otherwise output it entirely, which is useful for the `SHOW CREATE TABLE` query.
)", 0) \
DECLARE(UInt64, output_format_pretty_squash_consecutive_ms, 50, R"(
Wait for the next block for up to specified number of milliseconds and squash it to the previous before writing.
This avoids frequent output of too small blocks, but still allows to display data in a streaming fashion.
)", 0) \
DECLARE(UInt64, output_format_pretty_squash_max_wait_ms, 1000, R"(
Output the pending block in pretty formats if more than the specified number of milliseconds has passed since the previous output.
)", 0) \
DECLARE(UInt64Auto, output_format_pretty_color, "auto", R"(
Use ANSI escape sequences in Pretty formats. 0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.
)", 0) \
DECLARE(UInt64Auto, output_format_pretty_glue_chunks, "auto", R"(
If the data rendered in Pretty formats arrived in multiple chunks, even after a delay, but the next chunk has the same column widths as the previous, use ANSI escape sequences to move back to the previous line and overwrite the footer of the previous chunk to continue it with the data of the new chunk. This makes the result more visually pleasant.
0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.
)", 0) \
DECLARE(String, output_format_pretty_grid_charset, "UTF-8", R"(
Charset for printing grid borders. Available charsets: ASCII, UTF-8 (default one).
)", 0) \
DECLARE(UInt64, output_format_pretty_display_footer_column_names, true, R"(
Display column names in the footer if there are many table rows.
Possible values:
- 0 — No column names are displayed in the footer.
- 1 — Column names are displayed in the footer if row count is greater than or equal to the threshold value set by [output_format_pretty_display_footer_column_names_min_rows](#output_format_pretty_display_footer_column_names_min_rows) (50 by default).
**Example**
Query:
```sql
SELECT *, toTypeName(*) FROM (SELECT * FROM system.numbers LIMIT 1000);
```
Result:
```response
┌─number─┬─toTypeName(number)─┐
1. │ 0 │ UInt64 │
2. │ 1 │ UInt64 │
3. │ 2 │ UInt64 │
...
999. │ 998 │ UInt64 │
1000. │ 999 │ UInt64 │
└─number─┴─toTypeName(number)─┘
```
)", 0) \
DECLARE(UInt64, output_format_pretty_display_footer_column_names_min_rows, 50, R"(
Sets the minimum number of rows for which a footer with column names will be displayed if setting [output_format_pretty_display_footer_column_names](#output_format_pretty_display_footer_column_names) is enabled.
)", 0) \
DECLARE(UInt64, output_format_parquet_row_group_size, 1000000, R"(
Target row group size in rows.
)", 0) \
DECLARE(UInt64, output_format_parquet_row_group_size_bytes, 512 * 1024 * 1024, R"(
Target row group size in bytes, before compression.
)", 0) \
DECLARE(Bool, output_format_parquet_string_as_string, true, R"(
Use Parquet String type instead of Binary for String columns.
)", 0) \
DECLARE(Bool, output_format_parquet_fixed_string_as_fixed_byte_array, true, R"(
Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary for FixedString columns.
)", 0) \
DECLARE(ParquetVersion, output_format_parquet_version, "2.latest", R"(
Parquet format version for output format. Supported versions: 1.0, 2.4, 2.6 and 2.latest (default)
)", 0) \
DECLARE(ParquetCompression, output_format_parquet_compression_method, "zstd", R"(
Compression method for Parquet output format. Supported codecs: snappy, lz4, brotli, zstd, gzip, none (uncompressed)
)", 0) \
DECLARE(Bool, output_format_parquet_compliant_nested_types, true, R"(
In parquet file schema, use name 'element' instead of 'item' for list elements. This is a historical artifact of Arrow library implementation. Generally increases compatibility, except perhaps with some old versions of Arrow.
)", 0) \
DECLARE(Bool, output_format_parquet_use_custom_encoder, true, R"(
Use a faster Parquet encoder implementation.
)", 0) \
DECLARE(Bool, output_format_parquet_parallel_encoding, true, R"(
Do Parquet encoding in multiple threads. Requires output_format_parquet_use_custom_encoder.
)", 0) \
DECLARE(UInt64, output_format_parquet_data_page_size, 1024 * 1024, R"(
Target page size in bytes, before compression.
)", 0) \