public static class Group.CombineFieldsGlobally<InputT> extends Group.AggregateCombiner<InputT>
PTransform
that does a global combine using an aggregation built up by calls to
aggregateField and aggregateFields. The output of this transform will have a schema that is
determined by the output types of all the composed combiners.name, resourceHints
Modifier and Type | Method and Description |
---|---|
<CombineInputT,AccumT,CombineOutputT> |
aggregateField(int inputFieldId,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateField(int inputFieldId,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName) |
<CombineInputT,AccumT,CombineOutputT> |
aggregateField(java.lang.String inputFieldName,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateField(java.lang.String inputFieldName,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldBaseValue(int inputFieldId,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField) |
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldBaseValue(int inputFieldId,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName) |
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldBaseValue(java.lang.String inputFieldName,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField) |
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldBaseValue(java.lang.String inputFieldName,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName) |
<CombineInputT,AccumT,CombineOutputT> |
aggregateFields(FieldAccessDescriptor fieldAccessDescriptor,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFields(FieldAccessDescriptor fieldAccessDescriptor,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFields(java.util.List<java.lang.String> inputFieldNames,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFields(java.util.List<java.lang.String> inputFieldNames,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName)
Build up an aggregation function over the input elements.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldsById(java.util.List<java.lang.Integer> inputFieldIds,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
Schema.Field outputField)
Build up an aggregation function over the input elements by field id.
|
<CombineInputT,AccumT,CombineOutputT> |
aggregateFieldsById(java.util.List<java.lang.Integer> inputFieldIds,
Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn,
java.lang.String outputFieldName) |
static Group.CombineFieldsGlobally<?> |
create()
Returns a transform that does a global combine using an aggregation built up by calls to
aggregateField and aggregateFields.
|
PCollection<Row> |
expand(PCollection<InputT> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
public static Group.CombineFieldsGlobally<?> create()
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateField(java.lang.String inputFieldName, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
This method specifies an aggregation over single field of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
Field types in the output schema will be inferred from the provided combine function. Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the overload that allows setting the output field type explicitly.
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldBaseValue(java.lang.String inputFieldName, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateField(int inputFieldId, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldBaseValue(int inputFieldId, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateField(java.lang.String inputFieldName, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
This method specifies an aggregation over single field of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
aggregateField
in class Group.AggregateCombiner<InputT>
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldBaseValue(java.lang.String inputFieldName, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateField(int inputFieldId, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
Group.AggregateCombiner
This method specifies an aggregation over single field of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
aggregateField
in class Group.AggregateCombiner<InputT>
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldBaseValue(int inputFieldId, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFields(java.util.List<java.lang.String> inputFieldNames, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
Field types in the output schema will be inferred from the provided combine function. Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the overload that allows setting the output field type explicitly.
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldsById(java.util.List<java.lang.Integer> inputFieldIds, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFields(FieldAccessDescriptor fieldAccessDescriptor, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, java.lang.String outputFieldName)
This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
Field types in the output schema will be inferred from the provided combine function. Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the overload that allows setting the output field type explicitly.
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFields(java.util.List<java.lang.String> inputFieldNames, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFieldsById(java.util.List<java.lang.Integer> inputFieldIds, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
Group.AggregateCombiner
This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
Field types in the output schema will be inferred from the provided combine function. Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the overload that allows setting the output field type explicitly.
aggregateFieldsById
in class Group.AggregateCombiner<InputT>
public <CombineInputT,AccumT,CombineOutputT> Group.CombineFieldsGlobally<InputT> aggregateFields(FieldAccessDescriptor fieldAccessDescriptor, Combine.CombineFn<CombineInputT,AccumT,CombineOutputT> fn, Schema.Field outputField)
This method specifies an aggregation over multiple fields of the input. The union of all calls to aggregateField and aggregateFields will determine the output schema.
public PCollection<Row> expand(PCollection<InputT> input)
PTransform
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).
expand
in class PTransform<PCollection<InputT>,PCollection<Row>>