ExArrow.Sink.Parquet (ex_arrow v0.7.1)

View Source

Write an Arrow stream or batch list to a Parquet file.

A thin sink that consumes an ExArrow.Stream.t() (or a {schema, [batches]} tuple) and writes it to a Parquet file via ExArrow.Parquet.Writer.to_file/3. Emits a [:ex_arrow, :parquet, :write] telemetry event.

Example

{:ok, stream} = ExArrow.Stream.from_flight_sql(client, "SELECT * FROM t")
ExArrow.Sink.Parquet.write(stream, "/data/out.parquet")

Summary

Functions

Write source to a Parquet file at path.

Functions

write(source, path)

@spec write(
  ExArrow.Stream.t()
  | {ExArrow.Schema.t(), [ExArrow.RecordBatch.t()]}
  | [ExArrow.RecordBatch.t()],
  Path.t()
) :: :ok | {:error, String.t()}

Write source to a Parquet file at path.

source may be:

Returns :ok or {:error, message}.