Package org.apache.iceberg.parquet
Class Parquet.WriteBuilder
java.lang.Object
org.apache.iceberg.parquet.Parquet.WriteBuilder
- All Implemented Interfaces:
InternalData.WriteBuilder
- Enclosing class:
Parquet
-
Method Summary
Modifier and TypeMethodDescription<D> FileAppender<D> build()Build the configuredFileAppender.createWriterFunc(BiFunction<Schema, org.apache.parquet.schema.MessageType, ParquetValueWriter<?>> newCreateWriterFunc) createWriterFunc(Function<org.apache.parquet.schema.MessageType, ParquetValueWriter<?>> newCreateWriterFunc) Set a file metadata property.metricsConfig(MetricsConfig newMetricsConfig) Set the file schema's root name.Overwrite the file if it already exists.overwrite(boolean enabled) Set the file schema.Set a writer configuration property.Set aVariantShreddingFunctionthat is called with each variant field's name and field ID to produce the shredding type as atyped_valuefield.withAADPrefix(ByteBuffer aadPrefix) withFileEncryptionKey(ByteBuffer encryptionKey) writerVersion(org.apache.parquet.column.ParquetProperties.WriterVersion version) writeSupport(org.apache.parquet.hadoop.api.WriteSupport<?> newWriteSupport) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.InternalData.WriteBuilder
meta
-
Method Details
-
forTable
-
schema
Description copied from interface:InternalData.WriteBuilderSet the file schema.- Specified by:
schemain interfaceInternalData.WriteBuilder
-
variantShreddingFunc
Set aVariantShreddingFunctionthat is called with each variant field's name and field ID to produce the shredding type as atyped_valuefield. This field is added to the result variant struct alongside themetadataandvaluefields.- Parameters:
func-VariantShreddingFunctionthat produces a shreddedtyped_value- Returns:
- this for method chaining
-
named
Description copied from interface:InternalData.WriteBuilderSet the file schema's root name.- Specified by:
namedin interfaceInternalData.WriteBuilder
-
writeSupport
public Parquet.WriteBuilder writeSupport(org.apache.parquet.hadoop.api.WriteSupport<?> newWriteSupport) -
set
Description copied from interface:InternalData.WriteBuilderSet a writer configuration property.Write configuration affects writer behavior. To add file metadata properties, use
InternalData.WriteBuilder.meta(String, String).- Specified by:
setin interfaceInternalData.WriteBuilder- Parameters:
property- a writer config property namevalue- config value- Returns:
- this for method chaining
-
setAll
-
meta
Description copied from interface:InternalData.WriteBuilderSet a file metadata property.Metadata properties are written into file metadata. To alter a writer configuration property, use
InternalData.WriteBuilder.set(String, String).- Specified by:
metain interfaceInternalData.WriteBuilder- Parameters:
property- a file metadata property namevalue- config value- Returns:
- this for method chaining
-
createWriterFunc
public Parquet.WriteBuilder createWriterFunc(Function<org.apache.parquet.schema.MessageType, ParquetValueWriter<?>> newCreateWriterFunc) -
createWriterFunc
public Parquet.WriteBuilder createWriterFunc(BiFunction<Schema, org.apache.parquet.schema.MessageType, ParquetValueWriter<?>> newCreateWriterFunc) -
metricsConfig
-
overwrite
Description copied from interface:InternalData.WriteBuilderOverwrite the file if it already exists.- Specified by:
overwritein interfaceInternalData.WriteBuilder
-
overwrite
-
writerVersion
public Parquet.WriteBuilder writerVersion(org.apache.parquet.column.ParquetProperties.WriterVersion version) -
withFileEncryptionKey
-
withAADPrefix
-
build
Description copied from interface:InternalData.WriteBuilderBuild the configuredFileAppender.- Specified by:
buildin interfaceInternalData.WriteBuilder- Throws:
IOException
-