for example
public void invoke(String value, SinkFunction.Context context) throws SQLException {
statement_.execute("INSERT INTO test (column_1) VALUES '"+value"');
}
how to rightly insert value?
for example
public void invoke(String value, SinkFunction.Context context) throws SQLException {
statement_.execute("INSERT INTO test (column_1) VALUES '"+value"');
}
how to rightly insert value?
After you have got the connection you do this:
String sql = "INSERT INTO test (column_1) VALUES (?)";
PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1, value);
statement.addBatch();
statement.executeBatch();