Class: Parquet::ArrowFileWriter
- Inherits:
-
Object
- Object
- Parquet::ArrowFileWriter
- Defined in:
- lib/parquet/arrow-file-writer.rb
Instance Method Summary collapse
-
#write(target, chunk_size: nil) ⇒ void
Write data to Apache Parquet.
Instance Method Details
#write(record_batch) ⇒ void #write(table, chunk_size: nil) ⇒ void #write(raw_records) ⇒ void
This method returns an undefined value.
Write data to Apache Parquet.
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/parquet/arrow-file-writer.rb', line 84 def write(target, chunk_size: nil) case target when Arrow::RecordBatch write_record_batch(target) when Arrow::Table # Same as parquet::DEFAULT_MAX_ROW_GROUP_LENGTH in C++ chunk_size ||= 1024 * 1024 write_table(target, chunk_size) else record_batch = Arrow::RecordBatch.new(schema, target) write_record_batch(record_batch) end end |