We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I update the asynchronous write code after I upgrade the dependent version
version: 0.3.1-patch --> 0.6.0-patch3
ClickHouseDataSource clickHouseDataSource = this.clickHouseDataSource; try (ClickHouseConnection connection = clickHouseDataSource.getConnection(); ClickHouseStatement statement = connection.createStatement()) { StringBuilder stringBuilder = new StringBuilder(); for (String segment : segments) { stringBuilder.append(segment).append("\n"); } String database = clickhouseWriteProperties.getProperty("write.database"); String table = clickhouseWriteProperties.getProperty("write.table"); //version 0.3.1-patch code //============================= statement.write() .sql("insert into " + database + "." + table) .data(new ByteArrayInputStream(stringBuilder.toString().getBytes(StandardCharsets.UTF_8)), ClickHouseFormat.CSV) .send(); //============================= stringBuilder.setLength(0); } catch (Exception e) { e.printStackTrace(); }
The text was updated successfully, but these errors were encountered:
Good day, @WellJay !
There are a few changes in Mutation class that is returned by .write():
Mutation
.write()
table()
format()
send()
execute()
executeAndWait()
Here is an adopted code example:
stmt.write() .table("table") .format(ClickHouseFormat.CSV) .data(new ByteArrayInputStream(stringBuilder.toString().getBytes(StandardCharsets.UTF_8))) .execute();
Sorry, something went wrong.
No branches or pull requests
How do I update the asynchronous write code after I upgrade the dependent version
version: 0.3.1-patch --> 0.6.0-patch3
The text was updated successfully, but these errors were encountered: