swiftide_integrations/parquet/mod.rs
1//! Stream data from parquet files
2use std::path::PathBuf;
3
4use derive_builder::Builder;
5
6pub mod loader;
7
8/// Stream data from parquet files on a single column
9///
10/// Provide a path, column and optional batch size. The column must be of type `StringArray`. Then
11/// the column is loaded into the chunks of the Node.
12///
13/// # Panics
14///
15/// The loader can panic during initialization if anything with parquet or arrow fails before
16/// starting the stream.
17#[derive(Debug, Clone, Builder)]
18#[builder(setter(into, strip_option))]
19pub struct Parquet {
20    path: PathBuf,
21    column_name: String,
22    #[builder(default = "1024")]
23    batch_size: usize,
24}
25
26impl Parquet {
27    pub fn builder() -> ParquetBuilder {
28        ParquetBuilder::default()
29    }
30}