public class BeamRowToBigtableMutation extends PTransform<PCollection<Row>,PCollection<KV<ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>> implements java.io.Serializable
Requires a flat schema and a mapping which column family corresponds to which column.
Row
represents Bigtable Mutation
in the following way:
Mapped Beam Row
:
BEAM_ROW: ROW VALUE: Beam Mapped mutation: key, setCell[]
setCell: familyName, columnQualifier, ROW[columnQualifier] - familyName comes from the column:
family mappingSchema
type except for ARRAY, DECIMAL, ITERABLE, MAP, ROW
Mutation
:
Modifier and Type | Class and Description |
---|---|
static class |
BeamRowToBigtableMutation.ToBigtableRowFn |
name, resourceHints
Constructor and Description |
---|
BeamRowToBigtableMutation(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> familyColumnMapping) |
Modifier and Type | Method and Description |
---|---|
PCollection<KV<ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> |
expand(PCollection<Row> 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
public BeamRowToBigtableMutation(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> familyColumnMapping)
public PCollection<KV<ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> expand(PCollection<Row> 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<Row>,PCollection<KV<ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>>