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 aVariantShreddingFunction
that is called with each variant field's name and field ID to produce the shredding type as atyped_value
field.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, wait
Methods inherited from interface org.apache.iceberg.InternalData.WriteBuilder
meta
-
Method Details
-
forTable
-
schema
Description copied from interface:InternalData.WriteBuilder
Set the file schema.- Specified by:
schema
in interfaceInternalData.WriteBuilder
-
variantShreddingFunc
Set aVariantShreddingFunction
that is called with each variant field's name and field ID to produce the shredding type as atyped_value
field. This field is added to the result variant struct alongside themetadata
andvalue
fields.- Parameters:
func
-VariantShreddingFunction
that produces a shreddedtyped_value
- Returns:
- this for method chaining
-
named
Description copied from interface:InternalData.WriteBuilder
Set the file schema's root name.- Specified by:
named
in interfaceInternalData.WriteBuilder
-
writeSupport
public Parquet.WriteBuilder writeSupport(org.apache.parquet.hadoop.api.WriteSupport<?> newWriteSupport) -
set
Description copied from interface:InternalData.WriteBuilder
Set a writer configuration property.Write configuration affects writer behavior. To add file metadata properties, use
InternalData.WriteBuilder.meta(String, String)
.- Specified by:
set
in interfaceInternalData.WriteBuilder
- Parameters:
property
- a writer config property namevalue
- config value- Returns:
- this for method chaining
-
setAll
-
meta
Description copied from interface:InternalData.WriteBuilder
Set 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:
meta
in 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.WriteBuilder
Overwrite the file if it already exists.- Specified by:
overwrite
in interfaceInternalData.WriteBuilder
-
overwrite
-
writerVersion
public Parquet.WriteBuilder writerVersion(org.apache.parquet.column.ParquetProperties.WriterVersion version) -
withFileEncryptionKey
-
withAADPrefix
-
build
Description copied from interface:InternalData.WriteBuilder
Build the configuredFileAppender
.- Specified by:
build
in interfaceInternalData.WriteBuilder
- Throws:
IOException
-