[
https://issues.apache.org/jira/browse/BEAM-11873?focusedWorklogId=643955&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-643955
]
ASF GitHub Bot logged work on BEAM-11873:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 31/Aug/21 10:32
Start Date: 31/Aug/21 10:32
Worklog Time Spent: 10m
Work Description: AydarZaynutdinov commented on a change in pull request
#14856:
URL: https://github.com/apache/beam/pull/14856#discussion_r699195286
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -1222,7 +1239,244 @@ void set(
throws SQLException;
}
- /** A {@link PTransform} to write to a JDBC datasource. */
+ /**
+ * A {@link PTransform} to write to a JDBC datasource. Executes statements
one by one.
+ *
+ * <p>The INSERT, UPDATE, and DELETE commands sometimes have an optional
RETURNING clause that
+ * supports obtaining data from modified rows while they are being
manipulated. Output {@link
+ * PCollection} of this transform is a collection of such returning results
mapped by {@link
+ * RowMapper}.
+ */
+ @AutoValue
+ public abstract static class WriteWithResults<T, V>
+ extends PTransform<PCollection<T>, PCollection<V>> {
Review comment:
Add abstract class `JdbcWriteResult` and now `WriteWithResult` class
uses `<T, V extends JdbcWriteResult>`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 643955)
Time Spent: 6h 10m (was: 6h)
> Add support for writes returning values
> ---------------------------------------
>
> Key: BEAM-11873
> URL: https://issues.apache.org/jira/browse/BEAM-11873
> Project: Beam
> Issue Type: Improvement
> Components: io-java-jdbc
> Reporter: Maxim Ivanov
> Assignee: Vitaly Terentyev
> Priority: P3
> Time Spent: 6h 10m
> Remaining Estimate: 0h
>
> SQL allows returning values from INSERT or UPDATE queries. It would be great
> if these values were returned from write operation and could be processed by
> further PTransforms
--
This message was sent by Atlassian Jira
(v8.3.4#803005)