[
https://issues.apache.org/jira/browse/BEAM-10396?focusedWorklogId=609218&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-609218
]
ASF GitHub Bot logged work on BEAM-10396:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jun/21 15:59
Start Date: 09/Jun/21 15:59
Worklog Time Spent: 10m
Work Description: 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 609218)
Time Spent: 20m (was: 10m)
> Add WriteRows method to JdbcIO
> ------------------------------
>
> Key: BEAM-10396
> URL: https://issues.apache.org/jira/browse/BEAM-10396
> Project: Beam
> Issue Type: New Feature
> Components: io-java-jdbc
> Affects Versions: Not applicable
> Reporter: Piotr Szuberski
> Assignee: Sanamyan Raphael
> Priority: P3
> Labels: Clarified
> Fix For: Not applicable
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Add WriteRows class to JdbcIO similiar to ReadRows that can automatically
> infer Row Schema.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)