public class BeamRowToBigtableMutation
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.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 |
Constructor and Description |
---|
BeamRowToBigtableMutation(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> familyColumnMapping) |
Modifier and Type | Method and Description |
---|---|
org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> |
expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> input) |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
public BeamRowToBigtableMutation(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> familyColumnMapping)
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> input)
expand
in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>>