Parquet
parquet read <path>
Description
Read the rows of a Parquet file as a JSON array of objects (100000 rows at most)
Read the rows of a Parquet file as a JSON array of objects (100000 rows at most)
Parameters
path: The Parquet file (same rights as file load) - String - required
path: The Parquet file (same rights as file load) - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"; -> "[res]" (parquet read "tmp/tuto_store/sales.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"id": 1, "shop": "Saint-Denis", "amount": 120.5, "open": true, "day": "2026-10-31"}, {"id": 2, "shop": "Le Tampon", "amount": null, "open": false, "day": "2026-11-01"}, {"id": 3, "shop": "Saint-Pierre é", "amount": 87.25, "open": true, "day": "2026-11-02"}]
parquet read <path> <json_params>
Description
Read with parameters: columns (JSON array, in that order; needed to skip a nested column), limit (100000, 10000000 at most), offset (rows to skip: whole row groups and pages are skipped without being decompressed), binary_as_string (false: untyped BYTE_ARRAY as UTF-8 text instead of base64)
Read with parameters: columns (JSON array, in that order; needed to skip a nested column), limit (100000, 10000000 at most), offset (rows to skip: whole row groups and pages are skipped without being decompressed), binary_as_string (false: untyped BYTE_ARRAY as UTF-8 text instead of base64)
Parameters
path: The Parquet file (same rights as file load) - String - required
json_params: The parameters - String - required
path: The Parquet file (same rights as file load) - String - required
json_params: The parameters - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"; -> "[res]" (parquet read "tmp/tuto_store/sales.parquet" "{\"columns\": [\"shop\", \"id\"]}"); file delete "tmp/tuto_store"; [res]
mentdb
[{"shop": "Saint-Denis", "id": 1}, {"shop": "Le Tampon", "id": 2}, {"shop": "Saint-Pierre é", "id": 3}]
Complete: pagination with offset and limit
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"; -> "[res]" (parquet read "tmp/tuto_store/sales.parquet" "{\"offset\": 1, \"limit\": 1, \"columns\": [\"id\", \"amount\"]}"); file delete "tmp/tuto_store"; [res]
mentdb
[{"id": 2, "amount": null}]
Used in use cases (1 recipe)
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Often used with
array column · equal · file delete · file exist · file mkdir · parquet count · parquet schema · parquet write
array column · equal · file delete · file exist · file mkdir · parquet count · parquet schema · parquet write
parquet schema <path>
Description
The columns of a Parquet file: name, physical, logical (STRING, DATE, TIMESTAMP_MICROS, DECIMAL, INT8, UINT64...), nullable, precision, scale; plus adjusted_to_utc for times, type_length for fixed, nested true for a column that cannot be read (its name is the dotted path)
The columns of a Parquet file: name, physical, logical (STRING, DATE, TIMESTAMP_MICROS, DECIMAL, INT8, UINT64...), nullable, precision, scale; plus adjusted_to_utc for times, type_length for fixed, nested true for a column that cannot be read (its name is the dotted path)
Parameters
path: The Parquet file (same rights as file load) - String - required
path: The Parquet file (same rights as file load) - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"; -> "[res]" (parquet schema "tmp/tuto_store/sales.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"name": "id", "physical": "INT32", "logical": null, "nullable": true, "precision": null, "scale": null}, {"name": "shop", "physical": "BYTE_ARRAY", "logical": "STRING", "nullable": true, "precision": null, "scale": null}, {"name": "amount", "physical": "DOUBLE", "logical": null, "nullable": true, "precision": null, "scale": null}, {"name": "open", "physical": "BOOLEAN", "logical": null, "nullable": true, "precision": null, "scale": null}, {"name": "day", "physical": "INT32", "logical": "DATE", "nullable": true, "precision": null, "scale": null}]
Complete: an explicit schema: decimal and UTC timestamp
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/typed.parquet" "[{\"id\": 1, \"price\": \"19.90\", \"at\": \"2026-11-04T08:30:00Z\", \"note\": \"first\"}, {\"id\": 2, \"price\": 5, \"at\": \"2026-11-04T10:15:30.250+04:00\", \"note\": null}]" "{\"schema\": [{\"name\": \"id\", \"type\": \"int64\", \"nullable\": false}, {\"name\": \"price\", \"type\": \"decimal\", \"precision\": 10, \"scale\": 2}, {\"name\": \"at\", \"type\": \"timestamp\", \"utc\": true}, {\"name\": \"note\", \"type\": \"string\"}]}"; -> "[res]" (parquet schema "tmp/tuto_store/typed.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"name": "id", "physical": "INT64", "logical": null, "nullable": false, "precision": null, "scale": null}, {"name": "price", "physical": "INT64", "logical": "DECIMAL", "nullable": true, "precision": 10, "scale": 2}, {"name": "at", "physical": "INT64", "logical": "TIMESTAMP_MICROS", "nullable": true, "precision": null, "scale": null, "adjusted_to_utc": true}, {"name": "note", "physical": "BYTE_ARRAY", "logical": "STRING", "nullable": true, "precision": null, "scale": null}]
Used in use cases (1 recipe)
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Often used with
array column · equal · file delete · file exist · file mkdir · parquet count · parquet read · parquet write
array column · equal · file delete · file exist · file mkdir · parquet count · parquet read · parquet write
parquet info <path>
Description
The footer of a Parquet file: rows, row_groups, columns, created_by, format_version, compression, encodings, file_bytes, compressed_bytes, uncompressed_bytes, key_value_metadata
The footer of a Parquet file: rows, row_groups, columns, created_by, format_version, compression, encodings, file_bytes, compressed_bytes, uncompressed_bytes, key_value_metadata
Parameters
path: The Parquet file (same rights as file load) - String - required
path: The Parquet file (same rights as file load) - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]" "{\"compression\": \"gzip\", \"row_group_rows\": 2, \"metadata\": {\"source\": \"tuto\"}}"; -> "[res]" (parquet info "tmp/tuto_store/sales.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
{"rows": 3, "row_groups": 2, "columns": 5, "created_by": "MentDB parquet writer version 1.0", "format_version": 1, "compression": ["GZIP"], "encodings": ["PLAIN", "RLE"], "file_bytes": 974, "compressed_bytes": 502, "uncompressed_bytes": 319, "key_value_metadata": {"source": "tuto"}}
parquet count <path>
Description
The number of rows, from the footer: no data page is read
The number of rows, from the footer: no data page is read
Parameters
path: The Parquet file (same rights as file load) - String - required
path: The Parquet file (same rights as file load) - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"; -> "[res]" (parquet count "tmp/tuto_store/sales.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
3
Used in use cases (1 recipe)
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Often used with
array column · equal · file delete · file exist · file mkdir · parquet read · parquet schema · parquet write
array column · equal · file delete · file exist · file mkdir · parquet read · parquet schema · parquet write
parquet write <path> <json_rows>
Description
Write JSON rows to a Parquet file (snappy), types inferred from all the rows. Result: rows, bytes, row_groups, columns, compression. An existing file is replaced only if everything succeeded
Write JSON rows to a Parquet file (snappy), types inferred from all the rows. Result: rows, bytes, row_groups, columns, compression. An existing file is replaced only if everything succeeded
Parameters
path: The Parquet file (same rights as file load) - String - required
json_rows: The rows: JSON array of objects - String - required
path: The Parquet file (same rights as file load) - String - required
json_rows: The rows: JSON array of objects - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; -> "[res]" (parquet write "tmp/tuto_store/sales.parquet" "[{\"id\": 1, \"shop\": \"Saint-Denis\", \"amount\": 120.5, \"open\": true, \"day\": \"2026-10-31\"}, {\"id\": 2, \"shop\": \"Le Tampon\", \"amount\": null, \"open\": false, \"day\": \"2026-11-01\"}, {\"id\": 3, \"shop\": \"Saint-Pierre é\", \"amount\": 87.25, \"open\": true, \"day\": \"2026-11-02\"}]"); file delete "tmp/tuto_store"; [res]
mentdb
{"rows": 3, "bytes": 500, "row_groups": 1, "columns": 5, "compression": "SNAPPY"}
Complete: a column missing in a row is null
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/late.parquet" "[{\"a\": 1}, {\"a\": 2, \"b\": \"x\"}]"; -> "[res]" (parquet read "tmp/tuto_store/late.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"a": 1, "b": null}, {"a": 2, "b": "x"}]
parquet write <path> <json_rows> <json_params>
Description
Write with parameters: compression (snappy | gzip | zstd | none), schema (JSON array of {name, type, nullable (true)}; type boolean, int32, int64, float, double, string, binary (base64 text), date, timestamp (unit millis | micros | nanos, micros by default; utc true for an instant, then a value without zone is taken as UTC), decimal (precision 1 to 38, scale): a value that does not fit gives an error, never a rounding; a JSON number with more than 15 significant digits gives an error too, as it has already been rounded: give such a decimal as text; beware, digits beyond the 17th of a JSON number can vanish undetected), ignore_unknown (false: a field of the rows that is not in the schema gives an error; true: it is left out), row_group_rows (100000, 1 to 10000000), metadata (key_value_metadata of the footer), created_by (added between parentheses after the name of this writer, which cannot be replaced)
Write with parameters: compression (snappy | gzip | zstd | none), schema (JSON array of {name, type, nullable (true)}; type boolean, int32, int64, float, double, string, binary (base64 text), date, timestamp (unit millis | micros | nanos, micros by default; utc true for an instant, then a value without zone is taken as UTC), decimal (precision 1 to 38, scale): a value that does not fit gives an error, never a rounding; a JSON number with more than 15 significant digits gives an error too, as it has already been rounded: give such a decimal as text; beware, digits beyond the 17th of a JSON number can vanish undetected), ignore_unknown (false: a field of the rows that is not in the schema gives an error; true: it is left out), row_group_rows (100000, 1 to 10000000), metadata (key_value_metadata of the footer), created_by (added between parentheses after the name of this writer, which cannot be replaced)
Parameters
path: The Parquet file (same rights as file load) - String - required
json_rows: The rows: JSON array of objects - String - required
json_params: The parameters - String - required
path: The Parquet file (same rights as file load) - String - required
json_rows: The rows: JSON array of objects - String - required
json_params: The parameters - String - required
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/typed.parquet" "[{\"id\": 1, \"price\": \"19.90\", \"at\": \"2026-11-04T08:30:00Z\", \"note\": \"first\"}, {\"id\": 2, \"price\": 5, \"at\": \"2026-11-04T10:15:30.250+04:00\", \"note\": null}]" "{\"schema\": [{\"name\": \"id\", \"type\": \"int64\", \"nullable\": false}, {\"name\": \"price\", \"type\": \"decimal\", \"precision\": 10, \"scale\": 2}, {\"name\": \"at\", \"type\": \"timestamp\", \"utc\": true}, {\"name\": \"note\", \"type\": \"string\"}], \"compression\": \"zstd\"}"; -> "[res]" (parquet read "tmp/tuto_store/typed.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"id": 1, "price": 19.90, "at": "2026-11-04T08:30:00.000000Z", "note": "first"}, {"id": 2, "price": 5.00, "at": "2026-11-04T06:15:30.250000Z", "note": null}]
Complete: mixed values kept as text with an explicit schema
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; parquet write "tmp/tuto_store/mix.parquet" "[{\"v\": 1}, {\"v\": \"x\"}, {\"v\": {\"k\": [1]}}]" "{\"schema\": [{\"name\": \"v\", \"type\": \"string\"}], \"compression\": \"none\"}"; -> "[res]" (parquet read "tmp/tuto_store/mix.parquet"); file delete "tmp/tuto_store"; [res]
mentdb
[{"v": "1"}, {"v": "x"}, {"v": "{\"k\": [1]}"}]
Complete: an empty table needs a schema
admin
if (equal (file exist "tmp/tuto_store") "0") {file mkdir "tmp/tuto_store";}; -> "[res]" (parquet write "tmp/tuto_store/empty.parquet" "[]" "{\"schema\": [{\"name\": \"id\", \"type\": \"int32\"}]}"); file delete "tmp/tuto_store"; [res]
mentdb
{"rows": 0, "bytes": 76, "row_groups": 0, "columns": 1, "compression": "SNAPPY"}
Used in use cases (1 recipe)
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Files & archives manager › Export a table to Parquet for the analytics tools, then check the file
Often used with
array column · equal · file delete · file exist · file mkdir · parquet count · parquet read · parquet schema
array column · equal · file delete · file exist · file mkdir · parquet count · parquet read · parquet schema
