Skip to main content

Crate ambers

Crate ambers 

Source
Expand description

ambers: Pure Rust reader for SPSS .sav and .zsav files.

This library reads SPSS SAV/ZSAV files natively in Rust with no C dependencies. Data is returned as Apache Arrow RecordBatch for seamless integration with Polars, DataFusion, and other Arrow-compatible tools.

§Quick Start

use ambers::read_sav;

let (batch, meta) = read_sav("survey.sav").unwrap();
println!("Rows: {}", batch.num_rows());
println!("Columns: {}", batch.num_columns());
println!("Variables: {:?}", meta.variable_names);

Re-exports§

pub use crate::constants::Alignment;
pub use crate::constants::Measure;
pub use crate::metadata::MissingSpec;
pub use crate::metadata::MrSet;
pub use crate::metadata::MrType;
pub use crate::metadata::SpssMetadata;
pub use crate::metadata::Value;
pub use crate::scanner::SavScanner as Scanner;

Modules§

constants
error
metadata
scanner

Functions§

read_sav
Read an SPSS .sav or .zsav file, returning all data as an Arrow RecordBatch plus the file’s metadata.
read_sav_from_reader
Read an SPSS file from any reader that supports Read + Seek.
read_sav_metadata
Read only the metadata from an SPSS file (no data).
scan_sav
Create a streaming scanner for an SPSS .sav or .zsav file.
scan_sav_from_reader
Create a streaming scanner from any Read+Seek source.