Clickhouse and Flashblade S3

2 min readAug 22, 2023

In this quick how to I will cover the steps to leverage Pure Storage Flashblade S3 storage with a Clickhouse installation.

Disable SSL certificate validation

In the lab environment I do not have SSL certificates in place in order to disable ssl verification the following line must be set within the /etc/clickhouse-server/config.wml file:


External datasets

After restarting the clickhouse-server service I connect using the clickhouse-client, and can run direct queries on datasets residing on my S3 storage:

:) SELECT count() AS count
FROM s3('*.parquet', 'PSF....EIA', 'A12....OEN');

Query id: f4d3e05f-5bc9-461a-806f-be675d4b60ec

│ 39656098 │

In the above example I provide the endpoint path to the bucket and dataset files, the s3_access_key and then the s3_secret_key.

Clickhouse disks

In order to leverage Flashblade S3 storage as a disk within Clickhouse I create a configuration file under /etc/clickhouse-server/conf.d/fb03.xml with the following contents:


I restart the clickhouse-server service and connect to the client, I then validate that the S3 storage disk is available within the Clickhouse environment:

:) SELECT * FROM system.disks;

FROM system.disks

Query id: a18918e0-5755-4556-973e-dcceca69b354

│ default │ /var/lib/clickhouse/ │ 9573216256 │ 48420556800 │ 9573216256 │ 0 │ local │ 0 │ 0 │ 0 │ 0 │ 0 │ │
│ fb03 │ /var/lib/clickhouse/disks/fb03/ │ 18446744073709551615 │ 18446744073709551615 │ 18446744073709551615 │ 0 │ s3 │ 0 │ 0 │ 0 │ 1 │ 0 │ │

2 rows in set. Elapsed: 0.001 sec.

With this configured I can create a table on the Flashblade S3 storage as follows:

CREATE TABLE my_first_table
`user_id` UInt32,
`message` String,
`timestamp` DateTime,
`metric` Float32
ENGINE = MergeTree
PRIMARY KEY (user_id, timestamp)
SETTINGS storage_policy = 'external'

In the above SQL query the last line defines the storage policy to use for the table creation, in my case I named my policy “external” for the Flashblade S3 disk.

After creating this simple table I check the S3 buckets contents:

$ aws s3api list-objects-v2  --profile fbstaines03 --no-verify-ssl --endpoint-url= --bucket clickhouse | grep Key
"Key": "clickhouse_remove_objects_capability_752e5429-bcba-452c-bcda-b6214d76ddf0",
"Key": "san/szimkjmkmjeidpvemqduhzbjidlst",
"Key": "ujj/gwjmmjasuhodjiliwmxvzkbwzozxn",

I ran a quick tetst and created a second table and a new object was created on the Flashblade bucket “Key”: “gat/ywggwlxvdvwivllvqrljdkdkekeag”.


Clickhouse combined with Flashblade’ speed and simplicity at scale offers a powerful platform to extract value from your growing datasets while keeping things simple. To learn more about Pure Storage Flashblade, the only platform to provide consistent time to result at scale, click here.




Infrastructure engineering for modern data applications