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