Package org.apache.beam.sdk.transforms
Class JsonToRow.JsonToRowWithErrFn
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<PCollection<java.lang.String>,JsonToRow.ParseResult>
-
- org.apache.beam.sdk.transforms.JsonToRow.JsonToRowWithErrFn
-
- All Implemented Interfaces:
java.io.Serializable
,HasDisplayData
- Enclosing class:
- JsonToRow
public abstract static class JsonToRow.JsonToRowWithErrFn extends PTransform<PCollection<java.lang.String>,JsonToRow.ParseResult>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonToRow.JsonToRowWithErrFn.Builder
protected static class
JsonToRow.JsonToRowWithErrFn.ParseWithError
-
Field Summary
Fields Modifier and Type Field Description static Schema
ERROR_ROW_SCHEMA
static Schema
ERROR_ROW_WITH_ERR_MSG_SCHEMA
-
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
name, resourceHints
-
-
Constructor Summary
Constructors Constructor Description JsonToRowWithErrFn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonToRow.ParseResult
expand(PCollection<java.lang.String> jsonStrings)
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.JsonToRow.JsonToRowWithErrFn
setErrorField(java.lang.String errorField)
Adds the error message to the returned error Row.JsonToRow.JsonToRowWithErrFn
setLineField(java.lang.String lineField)
Sets the field name for the line field in the returned Row.JsonToRow.JsonToRowWithErrFn
withExtendedErrorInfo()
Adds the error message to the returned error Row.JsonToRow.JsonToRowWithErrFn
withNullBehavior(RowJson.RowJsonDeserializer.NullBehavior nullBehavior)
Sets the behavior of the deserializer according toRowJson.RowJsonDeserializer.NullBehavior
.-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Method Detail
-
withExtendedErrorInfo
public JsonToRow.JsonToRowWithErrFn withExtendedErrorInfo()
Adds the error message to the returned error Row.- Returns:
JsonToRow
-
setLineField
public JsonToRow.JsonToRowWithErrFn setLineField(java.lang.String lineField)
Sets the field name for the line field in the returned Row.- Returns:
JsonToRow
-
setErrorField
public JsonToRow.JsonToRowWithErrFn setErrorField(java.lang.String errorField)
Adds the error message to the returned error Row.- Returns:
JsonToRow
-
withNullBehavior
public JsonToRow.JsonToRowWithErrFn withNullBehavior(RowJson.RowJsonDeserializer.NullBehavior nullBehavior)
Sets the behavior of the deserializer according toRowJson.RowJsonDeserializer.NullBehavior
.- Returns:
JsonToRow
-
expand
public JsonToRow.ParseResult expand(PCollection<java.lang.String> jsonStrings)
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<java.lang.String>,JsonToRow.ParseResult>
-
-