Class WriterPropertiesBuilder
- Namespace
- ParquetSharp
- Assembly
- ParquetSharp.dll
Builder pattern for creating and configuring a WriterProperties object.
public sealed class WriterPropertiesBuilder : IDisposable
- Inheritance
-
WriterPropertiesBuilder
- Implements
- Inherited Members
Constructors
WriterPropertiesBuilder()
Create a new WriterPropertiesBuilder.
public WriterPropertiesBuilder()
Methods
Build()
Build the WriterProperties from the current state of the builder.
public WriterProperties Build()
Returns
- WriterProperties
The configured WriterProperties object.
Compression(Compression)
Set the compression codec to use for all columns.
public WriterPropertiesBuilder Compression(Compression codec)
Parameters
codec
CompressionThe Compression codec to use.
Returns
- WriterPropertiesBuilder
This builder instance.
Compression(ColumnPath, Compression)
Set the compression codec to use for a specific column.
public WriterPropertiesBuilder Compression(ColumnPath path, Compression codec)
Parameters
path
ColumnPathThe ColumnPath of the column to set the compression codec for.
codec
CompressionThe Compression codec to use.
Returns
- WriterPropertiesBuilder
This builder instance.
Compression(string, Compression)
Set the compression codec to use for a specific column.
public WriterPropertiesBuilder Compression(string path, Compression codec)
Parameters
path
stringThe path of the column to set the compression codec for.
codec
CompressionThe Compression codec to use.
Returns
- WriterPropertiesBuilder
This builder instance.
CompressionLevel(ColumnPath, int)
Set the compression level to use for a specific column.
public WriterPropertiesBuilder CompressionLevel(ColumnPath path, int compressionLevel)
Parameters
path
ColumnPathThe ColumnPath of the column to set the compression level for.
compressionLevel
intThe compression level to use.
Returns
- WriterPropertiesBuilder
This builder instance.
CompressionLevel(int)
Set the compression level to use for all columns.
public WriterPropertiesBuilder CompressionLevel(int compressionLevel)
Parameters
compressionLevel
intThe compression level to use.
Returns
- WriterPropertiesBuilder
This builder instance.
CompressionLevel(string, int)
Set the compression level to use for a specific column.
public WriterPropertiesBuilder CompressionLevel(string path, int compressionLevel)
Parameters
path
stringThe path of the column to set the compression level for.
compressionLevel
intThe compression level to use.
Returns
- WriterPropertiesBuilder
This builder instance.
CreatedBy(string)
Set an identifier for the entity that created the file.
public WriterPropertiesBuilder CreatedBy(string createdBy)
Parameters
createdBy
stringThe name of the entity that created the file.
Returns
- WriterPropertiesBuilder
This builder instance.
DataPagesize(long)
Set the maximum size of a data page in bytes.
public WriterPropertiesBuilder DataPagesize(long pageSize)
Parameters
pageSize
longThe maximum data page size to use.
Returns
- WriterPropertiesBuilder
This builder instance.
DictionaryPagesizeLimit(long)
Set the maximum size of a dictionary page in bytes.
public WriterPropertiesBuilder DictionaryPagesizeLimit(long dictionaryPagesizeLimit)
Parameters
dictionaryPagesizeLimit
longThe maximum dictionary page size to use.
Returns
- WriterPropertiesBuilder
This builder instance.
DisableDictionary()
Disable dictionary encoding for all columns.
public WriterPropertiesBuilder DisableDictionary()
Returns
- WriterPropertiesBuilder
This builder instance.
DisableDictionary(ColumnPath)
Disable dictionary encoding for a specific column.
public WriterPropertiesBuilder DisableDictionary(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to disable dictionary encoding for.
Returns
DisableDictionary(string)
Disable dictionary encoding for a specific column.
public WriterPropertiesBuilder DisableDictionary(string path)
Parameters
path
stringThe path of the column to disable dictionary encoding for.
Returns
- WriterPropertiesBuilder
This builder instance.
DisablePageChecksum()
Disable writing CRC checksums for data pages.
public WriterPropertiesBuilder DisablePageChecksum()
Returns
- WriterPropertiesBuilder
This builder instance.
DisableStatistics()
Disable statistics by default.
public WriterPropertiesBuilder DisableStatistics()
Returns
- WriterPropertiesBuilder
This builder instance.
DisableStatistics(ColumnPath)
Disable statistics for a specific column.
public WriterPropertiesBuilder DisableStatistics(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to disable statistics for.
Returns
- WriterPropertiesBuilder
This builder instance.
DisableStatistics(string)
Disable statistics for a specific column.
public WriterPropertiesBuilder DisableStatistics(string path)
Parameters
path
stringThe path of the column to disable statistics for.
Returns
- WriterPropertiesBuilder
This builder instance.
DisableWritePageIndex()
Disable writing the page index by default.
public WriterPropertiesBuilder DisableWritePageIndex()
Returns
- WriterPropertiesBuilder
This builder instance.
DisableWritePageIndex(ColumnPath)
Disable writing the page index for a specific column.
public WriterPropertiesBuilder DisableWritePageIndex(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to disable the page index for.
Returns
- WriterPropertiesBuilder
This builder instance.
DisableWritePageIndex(string)
Disable writing the page index for a specific column.
public WriterPropertiesBuilder DisableWritePageIndex(string path)
Parameters
path
stringThe path of the column to disable the page index for.
Returns
- WriterPropertiesBuilder
This builder instance.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
EnableDictionary()
Enable dictionary encoding by default.
public WriterPropertiesBuilder EnableDictionary()
Returns
- WriterPropertiesBuilder
This builder instance.
EnableDictionary(ColumnPath)
Enable dictionary encoding for a specific column.
public WriterPropertiesBuilder EnableDictionary(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to enable dictionary encoding for.
Returns
- WriterPropertiesBuilder
This builder instance.
EnableDictionary(string)
Enable dictionary encoding for a specific column.
public WriterPropertiesBuilder EnableDictionary(string path)
Parameters
path
stringThe path of the column to enable dictionary encoding for.
Returns
- WriterPropertiesBuilder
This builder instance.
EnablePageChecksum()
Enable writing CRC checksums for data pages.
public WriterPropertiesBuilder EnablePageChecksum()
Returns
- WriterPropertiesBuilder
This builder instance.
EnableStatistics()
Enable statistics by default.
public WriterPropertiesBuilder EnableStatistics()
Returns
- WriterPropertiesBuilder
This builder instance.
EnableStatistics(ColumnPath)
Enable statistics for a specific column.
public WriterPropertiesBuilder EnableStatistics(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to enable statistics for.
Returns
- WriterPropertiesBuilder
This builder instance.
EnableStatistics(string)
Enable statistics for a specific column.
public WriterPropertiesBuilder EnableStatistics(string path)
Parameters
path
stringThe path of the column to enable statistics for.
Returns
- WriterPropertiesBuilder
This builder instance.
EnableWritePageIndex()
Enable writing the page index by default
The page index contains statistics for data pages and can be used to skip pages when scanning data in ordered and unordered columns.
For more details, see https://github.com/apache/parquet-format/blob/master/PageIndex.md
public WriterPropertiesBuilder EnableWritePageIndex()
Returns
EnableWritePageIndex(ColumnPath)
Enable writing the page index for a specific column.
public WriterPropertiesBuilder EnableWritePageIndex(ColumnPath path)
Parameters
path
ColumnPathThe ColumnPath of the column to enable the page index for.
Returns
- WriterPropertiesBuilder
This builder instance.
EnableWritePageIndex(string)
Enable writing the page index for a specific column.
public WriterPropertiesBuilder EnableWritePageIndex(string path)
Parameters
path
stringThe path of the column to enable the page index for.
Returns
- WriterPropertiesBuilder
This builder instance.
Encoding(Encoding)
Set the encoding type to use for all columns.
public WriterPropertiesBuilder Encoding(Encoding encoding)
Parameters
Returns
- WriterPropertiesBuilder
This builder instance.
Encoding(ColumnPath, Encoding)
Set the encoding type to use for a specific column.
public WriterPropertiesBuilder Encoding(ColumnPath path, Encoding encoding)
Parameters
path
ColumnPathThe ColumnPath of the column to set the encoding for.
encoding
EncodingThe Encoding to use.
Returns
- WriterPropertiesBuilder
This builder instance.
Encoding(string, Encoding)
Set the encoding type to use for a specific column.
public WriterPropertiesBuilder Encoding(string path, Encoding encoding)
Parameters
Returns
- WriterPropertiesBuilder
This builder instance.
Encryption(FileEncryptionProperties?)
Set the encryption properties to use for the file.
public WriterPropertiesBuilder Encryption(FileEncryptionProperties? fileEncryptionProperties)
Parameters
fileEncryptionProperties
FileEncryptionPropertiesThe FileEncryptionProperties to use.
Returns
- WriterPropertiesBuilder
This builder instance.
MaxRowGroupLength(long)
Set the maximum size of a row group in bytes.
public WriterPropertiesBuilder MaxRowGroupLength(long maxRowGroupLength)
Parameters
maxRowGroupLength
longThe maximum row group size to use.
Returns
- WriterPropertiesBuilder
This builder instance.
Version(ParquetVersion)
Set the Parquet version to use for the file.
public WriterPropertiesBuilder Version(ParquetVersion version)
Parameters
version
ParquetVersionThe ParquetVersion to use.
Returns
- WriterPropertiesBuilder
This builder instance.
WriteBatchSize(long)
Set the number of rows to write in a single batch.
public WriterPropertiesBuilder WriteBatchSize(long writeBatchSize)
Parameters
writeBatchSize
longThe number of rows to write in a single batch.
Returns
- WriterPropertiesBuilder
This builder instance.