[
https://issues.apache.org/jira/browse/BEAM-10492?focusedWorklogId=461388&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-461388
]
ASF GitHub Bot logged work on BEAM-10492:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jul/20 02:49
Start Date: 21/Jul/20 02:49
Worklog Time Spent: 10m
Work Description: tysonjh commented on a change in pull request #12263:
URL: https://github.com/apache/beam/pull/12263#discussion_r457804483
##########
File path:
sdks/java/extensions/ml/src/main/java/org/apache/beam/sdk/extensions/ml/DLPDeidentifyText.java
##########
@@ -177,19 +177,24 @@ public DLPDeidentifyText build() {
@Override
public PCollection<KV<String, DeidentifyContentResponse>> expand(
PCollection<KV<String, String>> input) {
- return input
- .apply(ParDo.of(new MapStringToDlpRow(getColumnDelimiter())))
- .apply("Batch Contents", ParDo.of(new
BatchRequestForDLP(getBatchSizeBytes())))
- .apply(
- "DLPDeidentify",
+
+ ParDo.SingleOutput<KV<String, Iterable<Table.Row>>, KV<String,
DeidentifyContentResponse>>
+ deidentifyParDo =
ParDo.of(
new DeidentifyText(
getProjectId(),
getInspectTemplateName(),
getDeidentifyTemplateName(),
getInspectConfig(),
getDeidentifyConfig(),
- getHeaderColumns())));
+ getHeaderColumns()));
+ if (getHeaderColumns() != null) {
Review comment:
I'm not sure of all the available tools for testing DoFns in Beam so
there may be better options but one way would be to use the @NeedsRunner
annotation and some PAsserts to verify the expected output ([from the
wiki](https://cwiki.apache.org/confluence/display/BEAM/Contribution+Testing+Guide#ContributionTestingGuide-EffectiveuseoftheTestPipelineJUnitrule))?
It would require injecting a mock cloud client library to avoid making any
calls to the live API.
----------------------------------------------------------------
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: 461388)
Time Spent: 2h 50m (was: 2h 40m)
> DLP transforms don't accept side inputs
> ---------------------------------------
>
> Key: BEAM-10492
> URL: https://issues.apache.org/jira/browse/BEAM-10492
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Michał Walenia
> Assignee: Michał Walenia
> Priority: P2
> Fix For: 2.23.0
>
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)