Standard backend ยท import "parquet"

Parquet

Read and write typed columnar files for compact storage and efficient reloads. The standard hosts link the bundled backend directly.

Read and write Parquet

parquet::read

parquet::read(path: String) -> DataFrame

Reads a Parquet file into a DataFrame, preserving supported column types. In addition to local files, the bundled backend supports HTTP(S) locations and S3 URIs.

parquet::write

parquet::write(df: DataFrame, path: String) -> Int

Writes the DataFrame to a Parquet file and returns the number of rows written. Use this return value to record the result of a batch conversion.

Local and remote reads

import "parquet";

let local_prices = parquet::read("data/prices.parquet");
let public_prices = parquet::read("https://data.example.com/prices.parquet");
let cloud_prices = parquet::read("s3://market-data/prices.parquet?region=us-east-1");

Write a query result

Parquet works well as an output for computed tables that will be read again later.

let daily = local_prices[select { average = mean(price) }, by symbol];
let rows_written = parquet::write(daily, "out/daily.parquet");

For a directory conversion using fs::list, see the filesystem reference and the I/O guide.