Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

hdfs_* session settings

These settings are available in system.settings and are autogenerated from source.

hdfs_create_new_file_on_insert

Type
Bool
Default
0

Enables or disables creating a new file on each insert in HDFS engine tables. If enabled, on each insert a new HDFS file will be created with the name, similar to this pattern:

initial: data.Parquet.gz -> data.1.Parquet.gz -> data.2.Parquet.gz, etc.

Possible values:

  • 0 — INSERT query appends new data to the end of the file.
  • 1 — INSERT query creates a new file.

hdfs_ignore_file_doesnt_exist

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.60Allow to return 0 rows when the requested files don't exist instead of throwing an exception in HDFS table engine

Ignore absence of file if it does not exist when reading certain keys.

Possible values:

  • 1 — SELECT returns empty result.
  • 0 — SELECT throws an exception.

hdfs_replication

Type
UInt64
Default
0

The actual number of replications can be specified when the hdfs file is created.

hdfs_skip_empty_files

Type
Bool
Default
0

Enables or disables skipping empty files in HDFS engine tables.

Possible values:

  • 0 — SELECT throws an exception if empty file is not compatible with requested format.
  • 1 — SELECT returns empty result for empty file.

hdfs_throw_on_zero_files_match

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.60Allow to throw an error when ListObjects request cannot match any files in HDFS engine instead of empty query result

Throw an error if matched zero files according to glob expansion rules.

Possible values:

  • 1 — SELECT throws an exception.
  • 0 — SELECT returns empty result.

hdfs_truncate_on_insert

Type
Bool
Default
0

Enables or disables truncation before an insert in hdfs engine tables. If disabled, an exception will be thrown on an attempt to insert if a file in HDFS already exists.

Possible values:

  • 0 — INSERT query appends new data to the end of the file.
  • 1 — INSERT query replaces existing content of the file with the new data.
Navigation