You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2022/04/15 17:27:00 UTC
[jira] [Commented] (BEAM-13584) Add "Write.withResults()" for all Java SDK IOs
[ https://issues.apache.org/jira/browse/BEAM-13584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522907#comment-17522907 ]
Beam JIRA Bot commented on BEAM-13584:
--------------------------------------
This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.
Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.
> Add "Write.withResults()" for all Java SDK IOs
> ----------------------------------------------
>
> Key: BEAM-13584
> URL: https://issues.apache.org/jira/browse/BEAM-13584
> Project: Beam
> Issue Type: Improvement
> Components: io-ideas
> Reporter: Alexey Romanenko
> Priority: P2
> Labels: stale-P2
>
> Currently, by default, a "Write" transform is considered as a final {{PTransform}} in a pipeline and it returns {{PDone}} that can't be used later for next pipeline stages.
> Though, sometimes it's needed to use the results of write operation as input {{PCollection}} downstream of pipeline and some IOs already support this. For example, {{JdbcIO.Write}} has the methods {{withResults()}} and {{withWriteResults()}} that returns a {{PTransform}} with output {{PCollection<>}} of write results and it can be used to analyse the results or, along with {{Wait}} transform, to write into the second database only if writes into the first one were finished, like this:
> {code}
> PCollection<Void> firstWriteResults = data.apply(JdbcIO.write()
> .withDataSourceConfiguration(CONF_DB_1).withResults());
> data.apply(Wait.on(firstWriteResults))
> .apply(JdbcIO.write().withDataSourceConfiguration(CONF_DB_2));
> {code}
> So, it would be useful to add a {{WriteWithResults}} transform for other IOs that can be used in the same way.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)