private static void query() throws IoTDBConnectionException, StatementExecutionException {
    try (SessionDataSet dataSet = session.executeQueryStatement(SELECT_D1)) {
      System.out.println(dataSet.getColumnNames());
      dataSet.setFetchSize(1024); // default is 10000
      while (dataSet.hasNext()) {
        System.out.println(dataSet.next());
      }
    }
  }
This example shows how to insert data of TSDataType.TEXT. You can use the session interface to
write data of String type or Binary type.
example/session/src/main/java/org/apache/iotdb/SessionExample.java