Skip to content

Commit f35b49e

Browse files
committed
Make most fields of parquet optional
1 parent f3f035b commit f35b49e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

task/collect.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -320,18 +320,18 @@ function zip_datas(tmp, datas, name) {
320320
async function parquet_datas(tmp, datas, name) {
321321
const schema = new parquet.ParquetSchema({
322322
source_name: { type: 'UTF8' },
323-
geometry: { type: 'BYTE_ARRAY' },
324-
id: { type: 'UTF8' },
325-
pid: { type: 'UTF8' },
326-
number: { type: 'UTF8' },
327-
street: { type: 'UTF8' },
328-
unit: { type: 'UTF8' },
329-
city: { type: 'UTF8' },
330-
postcode: { type: 'UTF8' },
331-
district: { type: 'UTF8' },
332-
region: { type: 'UTF8' },
333-
addrtype: { type: 'UTF8' },
334-
notes: { type: 'UTF8' }
323+
geometry: { type: 'BYTE_ARRAY', optional: true },
324+
id: { type: 'UTF8', optional: true },
325+
pid: { type: 'UTF8', optional: true },
326+
number: { type: 'UTF8', optional: true },
327+
street: { type: 'UTF8', optional: true },
328+
unit: { type: 'UTF8', optional: true },
329+
city: { type: 'UTF8', optional: true },
330+
postcode: { type: 'UTF8', optional: true },
331+
district: { type: 'UTF8', optional: true },
332+
region: { type: 'UTF8', optional: true },
333+
addrtype: { type: 'UTF8', optional: true },
334+
notes: { type: 'UTF8', optional: true }
335335
});
336336
const writer = await parquet.ParquetWriter.openFile(schema, path.resolve(tmp, `${name}.parquet`));
337337

0 commit comments

Comments
 (0)