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:
  • Field Details

    • ERROR_ROW_SCHEMA

      public static final Schema ERROR_ROW_SCHEMA
    • ERROR_ROW_WITH_ERR_MSG_SCHEMA

      public static final Schema ERROR_ROW_WITH_ERR_MSG_SCHEMA
  • Constructor Details

    • JsonToRowWithErrFn

      public JsonToRowWithErrFn()
  • Method Details

    • withExtendedErrorInfo

      public JsonToRow.JsonToRowWithErrFn withExtendedErrorInfo()
      Adds the error message to the returned error Row.
      Returns:
      JsonToRow
    • setLineField

      public JsonToRow.JsonToRowWithErrFn setLineField(String lineField)
      Sets the field name for the line field in the returned Row.
      Returns:
      JsonToRow
    • setErrorField

      public JsonToRow.JsonToRowWithErrFn setErrorField(String errorField)
      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 to RowJson.RowJsonDeserializer.NullBehavior.
      Returns:
      JsonToRow
    • expand

      public JsonToRow.ParseResult expand(PCollection<String> jsonStrings)
      Description copied from class: PTransform
      Override this method to specify how this PTransform should be expanded on the given InputT.

      NOTE: This method should not be called directly. Instead apply the PTransform should be applied to the InputT using the apply 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 class PTransform<PCollection<String>,JsonToRow.ParseResult>