Package org.apache.beam.sdk.io.iceberg
Class AddFiles
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<String>,PCollectionRowTuple>
org.apache.beam.sdk.io.iceberg.AddFiles
- All Implemented Interfaces:
Serializable,HasDisplayData
A transform that takes in a stream of file paths, converts them to Iceberg
DataFiles with
partition metadata and metrics, then commits them to an Iceberg Table.- 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<String> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.static org.apache.iceberg.MetricsgetFileMetrics(org.apache.iceberg.io.InputFile file, org.apache.iceberg.FileFormat format, org.apache.iceberg.MetricsConfig config, org.apache.iceberg.mapping.NameMapping mapping) static org.apache.iceberg.FileFormatinferFormat(String path) Tries to infer other file formats.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
-
AddFiles
-
-
Method Details
-
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<String>,PCollectionRowTuple>
-
getFileMetrics
public static org.apache.iceberg.Metrics getFileMetrics(org.apache.iceberg.io.InputFile file, org.apache.iceberg.FileFormat format, org.apache.iceberg.MetricsConfig config, org.apache.iceberg.mapping.NameMapping mapping) throws IOException - Throws:
IOException
-
inferFormat
Tries to infer other file formats. Defaults to Parquet.
-