public void resetTable() {
        try (InputStream initSql = Stream2DbWriter.class.getResourceAsStream("/simple_writer_init.sql")) {
            // Sending a simple query - no settings required
            client.query("drop table if exists hacker_news_articles").get(3, TimeUnit.SECONDS);

            // Reading the SQL file and executing it
            BufferedReader reader = new BufferedReader(new InputStreamReader(initSql));
            String sql = reader.lines().collect(Collectors.joining("\n"));
            log.debug("Executing Create Table: {}", sql);
            client.query(sql).get(3, TimeUnit.SECONDS);
            log.info("Table initialized");
        } catch (Exception e) {
            log.error("Failed to initialize table", e);
        }
    }
<p>Example class showing how to pass raw data stream to the new ClickHouse client.</p>
<p>Input data is passed as a InputStream to the {@link com.clickhouse.client.api.Client#insert(String, InputStream, ClickHouseFormat, InsertSettings)}
and the format is specified there too.</p>
examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/Stream2DbWriter.java