TheNeuralBit commented on a change in pull request #14954:
URL: https://github.com/apache/beam/pull/14954#discussion_r648456230
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java
##########
@@ -139,9 +139,8 @@ public Schema schema() {
return new PTransform<PCollection<Row>, PDone>() {
@Override
public PDone expand(PCollection<Row> input) {
- // TODO: BEAM-10396 use writeRows() when it's available
return input.apply(
- JdbcIO.<Row>write()
+ JdbcIO.writeRows()
.withDataSourceConfiguration(getDataSourceConfiguration())
.withStatement(generateWriteStatement(input.getSchema()))
.withPreparedStatementSetter(new
JdbcUtil.BeamRowPreparedStatementSetter()));
Review comment:
```suggestion
JdbcIO.writeRows()
.withDataSourceConfiguration(getDataSourceConfiguration());
```
Isn't the idea to avoid having to specify a write statement here?
Also, note that this code is leveraged in Python via
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py.
We should make sure that that is still passing in Python PostCommits before
merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]