clickhouse-java
clickhouse-java copied to clipboard
Java client and JDBC driver for ClickHouse
JDBC version : 0.1.48 and JDK 1.8.171 ``` ClickHouseProperties properties = new ClickHouseProperties(); properties.setUseServerTimeZone(false); ClickHouseProperties withCredentials = properties.withCredentials(this.username, this.password); this.clickHouseDataSource = new BalancedClickhouseDataSource(this.jdbcUrl, withCredentials); ``````` ``````` ``````` java.sql.Timestamp sqlTimestamp =...
Hi, It looks to me that it is not possible to use the JDBC driver to insert data into Array(FixedString(N)) column. [The code](https://github.com/yandex/clickhouse-jdbc/blob/4697970bbffc4729889e9ba6436432c039920bed/src/main/java/ru/yandex/clickhouse/util/ClickHouseArrayUtil.java#L118) looks like this: ``` ArrayBuilder builder =...
I have query SELECT date, groupArray([widget, toString(actionCount)]) AS widgetList FROM ( SELECT date, arrayJoin(queries) AS widget, count(*) AS actionCount FROM prodlog_temp.log WHERE mark = 'page updated' GROUP BY date, widget...
This is the setup that we have in our company: * CH cluster (multiple nodes with different IPs) * DNS server that resolved an internal hostname to the list of...
``` DATETIME64_MAX = LocalDateTime.of(LocalDate.of(2283, 11, 11), LocalTime.MAX).toEpochSecond(ZoneOffset.UTC); ``` In Java 11, the nanosecond part is lost because of converting to `LocalDateTime`, maybe it should be kept as `Instant`. Also the...
I've got a table with a column that has type `Array(Nullable(Float64))`. In my Java code, I do something like: ```java Double[] values = {1.0}; preparedStatement.setArray(1, preparedStatement.getConnection().createArrayOf("DOUBLE", values)); ``` When the...
I would like to have ability to fetch results compressed by ZSTD in my case ZSTD allows to fetch 3 times less data and twice faster: ``` ### enable_http_compression=0 time...
Hello everyone, i was trying to write a new table from spark to clickhouse (this table ddl was not created in clickhouse yet) by this piece of code: ``` df2.write\...
Hi, I have tried this: InputStream in = new ByteArrayInputStream("JHON,1\nSMITH,3".getBytes()); client.connect(nodes).write().query(""" CREATE TABLE myTable ENGINE=LOG AS SELECT * FROM input() FORMAT CSV """).data(in).executeAndWait().close(); But with no luck. I think "input"...
Mikhail Filimonov, [13.04.2022 14:48] Hello :) In newer api the sendRowBinaryStream function is missing. Is there some alternative way to send RowBinary to ClickHouse? Do you have some example of...