Class IcebergIO.WriteRows
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
IcebergIO
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<Row> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.to(DynamicDestinations destinations) to(org.apache.iceberg.catalog.TableIdentifier identifier) withDirectWriteByteLimit(Integer directWriteByteLimit) withDistributionMode(org.apache.iceberg.DistributionMode mode) Defines distribution of write data.withPartitionFields(List<String> partitionFields) Defines the desired Partition Spec to be applied when the Iceberg table must be dynamically created, e.g.withSortOrder(List<String> sortFields) Defines the desired Sort Order to be applied when the Iceberg table must be dynamically created, e.g.withTriggeringFrequency(Duration triggeringFrequency) Sets the frequency at which data is written to files and a newSnapshotis produced.withWriteProperties(Map<String, String> writeProperties) Defines properties to be passed to the Iceberg writer itself.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
WriteRows
public WriteRows()
-
-
Method Details
-
to
-
to
-
withTriggeringFrequency
Sets the frequency at which data is written to files and a newSnapshotis produced.Roughly every triggeringFrequency duration, records are written to data files and appended to the respective table. Each append operation creates a new table snapshot.
Generally speaking, increasing this duration will result in fewer, larger data files and fewer snapshots.
This is only applicable when writing an unbounded
PCollection(i.e. a streaming pipeline). -
withDirectWriteByteLimit
-
withDistributionMode
Defines distribution of write data. Supported distributions:-
: don't shuffle rows (default)
invalid reference
DistributionMode.NONE -
: shuffle rows by partition key before writing data
invalid reference
DistributionMode.HASH
is not supported yetinvalid reference
DistributionMode.RANGE -
-
withAutosharding
-
withWriteProperties
Defines properties to be passed to the Iceberg writer itself. Note that these properties are execution-scoped, meaning that they are applied to a preexisting table and will not mutate any table-level properties.To set table-level properties that will be applied to dynamically created tables, use the managed Iceberg transform instead, setting the `table_properties` config property.
See: https://iceberg.apache.org/docs/latest/configuration/#write-properties
-
withPartitionFields
Defines the desired Partition Spec to be applied when the Iceberg table must be dynamically created, e.g. `bucket(id_field, 32)` or `day(timestamp_field)`See: https://iceberg.apache.org/spec/#partitioning
-
withSortOrder
Defines the desired Sort Order to be applied when the Iceberg table must be dynamically created, e.g. `int_field desc` or `bucket(modulo_5, 4) asc nulls last`See: https://iceberg.apache.org/spec/#sorting
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.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:
expandin classPTransform<PCollection<Row>,IcebergWriteResult>
-