serde_arrow 0.4.0

convert sequences of structs / maps to arrow tables
Documentation

serde_arrow - convert sequences of structs / maps to arrow tables

Usage:

# use serde_arrow::{Result, Schema};
# use serde::Serialize;
# use std::convert::TryFrom;
#
# fn main() -> Result<()> {
#[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 = Schema::from_records(&records)?;
let batch = serde_arrow::to_record_batch(&records, &schema)?;

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

See [implementation] for an explanation of how this package works and its underlying data model.