Write RecordBatch to the Parquet file. Parameters ---------- batch : RecordBatch row_group_size : int, default None Maximum number of rows in written row group. If None, the row group size will be the minimum of the RecordBatch
(self, batch, row_group_size=None)
| 1170 | raise TypeError(type(table_or_batch)) |
| 1171 | |
| 1172 | def write_batch(self, batch, row_group_size=None): |
| 1173 | """ |
| 1174 | Write RecordBatch to the Parquet file. |
| 1175 | |
| 1176 | Parameters |
| 1177 | ---------- |
| 1178 | batch : RecordBatch |
| 1179 | row_group_size : int, default None |
| 1180 | Maximum number of rows in written row group. If None, the |
| 1181 | row group size will be the minimum of the RecordBatch |
| 1182 | size (in rows) and 1024 * 1024. If set larger than 64 * 1024 * 1024 |
| 1183 | then 64 * 1024 * 1024 will be used instead. |
| 1184 | """ |
| 1185 | table = pa.Table.from_batches([batch], batch.schema) |
| 1186 | self.write_table(table, row_group_size) |
| 1187 | |
| 1188 | def write_table(self, table, row_group_size=None): |
| 1189 | """ |