Package org.apache.beam.sdk.transforms
Class JsonToRow.JsonToRowWithErrFn
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<String>,JsonToRow.ParseResult>
org.apache.beam.sdk.transforms.JsonToRow.JsonToRowWithErrFn
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
JsonToRow
public abstract static class JsonToRow.JsonToRowWithErrFn
extends PTransform<PCollection<String>,JsonToRow.ParseResult>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
protected static class
-
Field Summary
FieldsFields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<String> jsonStrings) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.setErrorField
(String errorField) Adds the error message to the returned error Row.setLineField
(String lineField) Sets the field name for the line field in the returned Row.Adds the error message to the returned error Row.withNullBehavior
(org.apache.beam.sdk.util.RowJson.RowJsonDeserializer.NullBehavior nullBehavior) Sets the behavior of the deserializer according toRowJson.RowJsonDeserializer.NullBehavior
.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Field Details
-
ERROR_ROW_SCHEMA
-
ERROR_ROW_WITH_ERR_MSG_SCHEMA
-
-
Constructor Details
-
JsonToRowWithErrFn
public JsonToRowWithErrFn()
-
-
Method Details
-
withExtendedErrorInfo
Adds the error message to the returned error Row.- Returns:
JsonToRow
-
setLineField
Sets the field name for the line field in the returned Row.- Returns:
JsonToRow
-
setErrorField
Adds the error message to the returned error Row.- Returns:
JsonToRow
-
withNullBehavior
public JsonToRow.JsonToRowWithErrFn withNullBehavior(org.apache.beam.sdk.util.RowJson.RowJsonDeserializer.NullBehavior nullBehavior) Sets the behavior of the deserializer according toRowJson.RowJsonDeserializer.NullBehavior
.- Returns:
JsonToRow
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<String>,
JsonToRow.ParseResult>
-