> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# s3_* session settings

> ClickHouse session settings in the s3_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="s3_check_objects_after_upload">
  s3\_check\_objects\_after\_upload
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Check each uploaded object to s3 with head request to be sure that upload was successful

<h2 id="s3_connect_timeout_ms">
  s3\_connect\_timeout\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1000"},{"label": "Introduce new dedicated setting for s3 connection timeout"}]}]} />

Connection timeout for host from s3 disks.

<h2 id="s3_create_new_file_on_insert">
  s3\_create\_new\_file\_on\_insert
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

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

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

Possible values:

* 0 — `INSERT` query creates a new file or fail if file exists and s3\_truncate\_on\_insert is not set.
* 1 — `INSERT` query creates a new file on each insert using suffix (from the second one) if s3\_truncate\_on\_insert is not set.

See more details [here](/docs/integrations/connectors/data-ingestion/AWS/integrating-s3-with-clickhouse#inserting-data).

<h2 id="s3_disable_checksum">
  s3\_disable\_checksum
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Do not calculate a checksum when sending a file to S3. This speeds up writes by avoiding excessive processing passes on a file. It is mostly safe as the data of MergeTree tables is checksummed by ClickHouse anyway, and when S3 is accessed with HTTPS, the TLS layer already provides integrity while transferring through the network. While additional checksums on S3 give defense in depth.

<h2 id="s3_ignore_file_doesnt_exist">
  s3\_ignore\_file\_doesnt\_exist
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "0"},{"label": "Allow to return 0 rows when the requested files don't exist instead of throwing an exception in S3 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.

<h2 id="s3_list_object_keys_size">
  s3\_list\_object\_keys\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

Maximum number of files that could be returned in batch by ListObject request

<h2 id="s3_min_upload_part_size">
  s3\_min\_upload\_part\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16777216" />

The minimum size of part to upload during multipart upload to S3.

<h2 id="s3_path_filter_limit">
  s3\_path\_filter\_limit
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.12"},{"label": "1000"},{"label": "New setting"}]}]} />

Maximum number of `_path` values that can be extracted from query filters to use for file iteration
instead of glob listing. 0 means disabled.

<h2 id="s3_request_timeout_ms">
  s3\_request\_timeout\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="30000" />

Idleness timeout for sending and receiving data to/from S3. Fail if a single TCP read or write call blocks for this long.

<h2 id="s3_skip_empty_files">
  s3\_skip\_empty\_files
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.11"},{"label": "1"},{"label": "We hope it will provide better UX"}]}]} />

Enables or disables skipping empty files in [S3](/docs/reference/engines/table-engines/integrations/s3) 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.

<h2 id="s3_slow_all_threads_after_network_error">
  s3\_slow\_all\_threads\_after\_network\_error
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "1"},{"label": "New setting"}]}]} />

When set to `true`, all threads executing S3 requests to the same backup endpoint are slowed down
after any single s3 request encounters a retryable network error, such as socket timeout.
When set to `false`, each thread handles S3 request backoff independently of the others.

<h2 id="s3_strict_upload_part_size">
  s3\_strict\_upload\_part\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

The exact size of part to upload during multipart upload to S3 (some implementations does not supports variable size parts).

<h2 id="s3_throw_on_zero_files_match">
  s3\_throw\_on\_zero\_files\_match
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Throw an error, when ListObjects request cannot match any files

<h2 id="s3_truncate_on_insert">
  s3\_truncate\_on\_insert
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enables or disables truncate before inserts in s3 engine tables. If disabled, an exception will be thrown on insert attempts if an S3 object already exists.

Possible values:

* 0 — `INSERT` query creates a new file or fail if file exists and s3\_create\_new\_file\_on\_insert is not set.
* 1 — `INSERT` query replaces existing content of the file with the new data.

See more details [here](/docs/integrations/connectors/data-ingestion/AWS/integrating-s3-with-clickhouse#inserting-data).

<h2 id="s3_uri_style">
  s3\_uri\_style
</h2>

<SettingsInfoBlock type="S3UriStyle" default_value="auto" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "auto"},{"label": "New setting."}]}]} />

Force the s3 endpoint style. Possible values: auto, virtual\_hosted, path.

<h2 id="s3_use_adaptive_timeouts">
  s3\_use\_adaptive\_timeouts
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

When set to `true` than for all s3 requests first two attempts are made with low send and receive timeouts.
When set to `false` than all attempts are made with identical timeouts.
