Skip to content

Commit

Permalink
Fix null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Medvedev committed Mar 18, 2021
1 parent 74be312 commit 6e22dfc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.apache.beam.sdk.values.Row;
import org.apache.beam.sdk.values.TupleTag;
import org.apache.beam.sdk.values.TypeDescriptors;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -275,7 +276,7 @@ public static PipelineResult run(DataTokenizationOptions options) {
.via(
(Row errRow) ->
FailsafeElement.of(errRow.getString("line"), errRow.getString("line"))
.setErrorMessage(errRow.getString("err"))))
.setErrorMessage(Strings.nullToEmpty(errRow.getString("err")))))
.apply(
"WriteCsvConversionErrorsToFS",
ErrorConverters.WriteStringMessageErrorsAsCsv.newBuilder()
Expand Down

0 comments on commit 6e22dfc

Please sign in to comment.