Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .apply(JdbcIO.<MyData>write()
- .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
- "org.postgresql.Driver", "jdbc:postgresql://localhost:5432/postgres")
- .withUsername("postgres")
- .withPassword("password"))
- .withStatement("do $$n" +
- "begin " +
- "perform test_routine(first := ?, second := ?, age := ?) " +
- "endn" +
- "$$;")
- .withPreparedStatementSetter(new JdbcIO.PreparedStatementSetter<MyData>() {
- public void setParameters(MyData element, PreparedStatement query)
- throws SQLException {
- query.setString(1,element.mfirst);
- query.setString(2, element.second);
- query.setInt(3, element.age);
- }
- })
- );
- org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement