pub mod json;
mod manifest;
mod schema;
mod secondary;
mod writer;
use std::sync::Arc;
pub use manifest::{Manifest, ManifestFile, write_manifest};
pub use schema::{
PARSER_VERSION, SCHEMA_MAJOR, SCHEMA_MINOR, resources_schema, schema_field_names,
};
pub use secondary::{
components_field_names, components_schema, dependencies_field_names, dependencies_schema,
modules_field_names, modules_schema,
};
pub use writer::{
CompressionOpt, ExportOptions, ExportReport, ExportedFile, Exporter, ParquetExporter,
SecondaryTable,
};
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum ExportError {
#[error("output exists and --overwrite not set: {0}")]
OutputExists(Arc<std::path::Path>),
#[error("output directory does not exist: {0}")]
OutDirMissing(Arc<std::path::Path>),
#[error("output path is not a directory: {0}")]
OutDirNotDir(Arc<std::path::Path>),
#[error("i/o error at {path}: {source}")]
Io {
path: Arc<std::path::Path>,
#[source]
source: std::io::Error,
},
#[error("parquet writer error at {path}: {source}")]
Parquet {
path: Arc<std::path::Path>,
#[source]
source: parquet::errors::ParquetError,
},
#[error("arrow error at {path}: {source}")]
Arrow {
path: Arc<std::path::Path>,
#[source]
source: arrow::error::ArrowError,
},
#[error("manifest serialisation error at {path}: {source}")]
Manifest {
path: Arc<std::path::Path>,
#[source]
source: serde_json::Error,
},
}