go-clickhouse
go-clickhouse copied to clipboard
Does this support send stream?
If send a local file, like clickhouse-jdbc, usage is:
val statement = conn.createStatement
.write()
.data(createHadoopInputStream(filePath), inputFileFormat)
statement.sql(insertSql).send()
It invoke sendStream(), the code is here: https://github.com/ClickHouse/clickhouse-jdbc/blob/9b72c8afc3ead981bb62b998ff64280095ceb317/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/ClickHouseStatementImpl.java#L1040
This driver uses the http clickhouse api. To insert batches you can use Begin -> Prepare -> Exec -> Commit syntax. And you can read the file line by line. Please check the readme for examples