sqlamazon-s3clickhouse

Why do I get a read timeout when trying to insert data into Clickhouse?


I'm trying to load some data from S3 into Clickhouse:

INSERT INTO MY_TABLE
SELECT * 
FROM s3('https://xxx.s3.amazonaws.com/xxx/*.parquet',
        'Parquet', extra_credentials(role_arn = 'arn:aws:iam::xxx'));

But I always get "read timed out" from Clickhouse.

I've tried to execute the select statement and it could return data as expected. How should I resolve this?


Solution

  • Looks like this is a client-side timeout, check your query in system.processes

    try to use clickhouse-client --receive-timeout=86400 -q "INSERT INTO MY_TABLE SELECT * FROM s3('https://xxx.s3.amazonaws.com/xxx/*.parquet', 'Parquet', extra_credentials(role_arn = 'arn:aws:iam::xxx'));