Crate serde_arrow[][src]

Expand description

serde_arrow - convert sequences of structs / maps to arrow tables

Usage:

#[derive(Serialize)]
struct Example {
    a: f32,
    b: i32,
}

let records = vec![
    Example { a: 1.0, b: 1 },
    Example { a: 2.0, b: 2 },
    Example { a: 3.0, b: 3 },
];

// try to auto-detect the arrow types, result can be overwritten and customized
let schema = serde_arrow::trace_schema(&records)?;
let batch = serde_arrow::to_record_batch(&records, &schema)?;

assert_eq!(batch.num_rows(), 3);
assert_eq!(batch.num_columns(), 2);

Macros

Structs

The schema of a collection of records

Enums

The data type of a column

Errors during conversion or tracing

Functions

Helper to write an Arrow IPC file from a sequence of records

Convert a sequence of records into an Arrow RecordBatch

Try to determine the schema from the existing records

Type Definitions