pyarrow.orc.write_table#
- pyarrow.orc.write_table(table, where, *, file_version='0.12', batch_size=1024, stripe_size=67108864, compression='uncompressed', compression_block_size=65536, compression_strategy='speed', row_index_stride=10000, padding_tolerance=0.0, dictionary_key_size_threshold=0.0, bloom_filter_columns=None, bloom_filter_fpp=0.05)[source]#
将表写入 ORC 文件。
- 参数:
- table
pyarrow.lib.Table 要写入 ORC 文件的表
- where
strorpyarrow.io.NativeFile 可写目标。有关传递 Python 文件对象或字节缓冲区的信息,请参阅 pyarrow.io.PythonFileInterface、pyarrow.io.BufferOutputStream 或 pyarrow.io.FixedSizeBufferWriter。
- file_version{“0.11”, “0.12”}, default “0.12”
确定要使用的 ORC 文件版本。Hive 0.11 / ORC v0 是旧版本,而 Hive 0.12 / ORC v1 是新版本。
- batch_size
int, default 1024 ORC 写入器一次写入的行数。
- stripe_size
int, default 64 * 1024 * 1024 每个 ORC 条带的大小(以字节为单位)。
- compression
str, default ‘uncompressed’ 压缩编解码器。有效值:{‘UNCOMPRESSED’, ‘SNAPPY’, ‘ZLIB’, ‘LZ4’, ‘ZSTD’} 请注意,当前不支持 LZ0。
- compression_block_size
int, default 64 * 1024 每个压缩块的大小(以字节为单位)。
- compression_strategy
str, default ‘speed’ 压缩策略,即速度与大小缩减。有效值:{‘SPEED’, ‘COMPRESSION’}
- row_index_stride
int, default 10000 行索引步幅,即行索引中每个条目的行数。
- padding_tolerance
double, default 0.0 填充容差。
- dictionary_key_size_threshold
double, default 0.0 字典键大小阈值。0 表示禁用字典编码。1 表示始终启用字典编码。
- bloom_filter_columns
None, set-like or list-like, defaultNone 使用布隆过滤器的列。
- bloom_filter_fpp
double, default 0.05 布隆过滤器误报率的上限。
- table