in src/main/java/com/google/solutions/df/log/aggregations/common/DLPTransform.java [95:112]
public PCollection<Row> expand(PCollection<Row> input) {
if (deidTemplateName() == null) {
return input.apply(
"Convert To BqRow",
MapElements.via(new SimpleFunction<Row, Row>((Row bqRow) -> bqRow) {}));
}
return input
.apply("AddKey", WithKeys.of(randomKey()))
.apply("Convert To DLP Row", ParDo.of(new ConvertToDLPRow()))
.apply("Batch Request", ParDo.of(new BatchTableRequest(batchSize())))
.apply(
"DLP Tokenization",
ParDo.of(
new DLPTokenizationDoFn(projectId(), deidTemplateName(), inspectTemplateName())))
.apply("ConvertToBQRow", MapElements.via(new ConvertToBQRow()));
}