elusion 8.3.0

Elusion is a modern DataFrame / Data Engineering / Data Analysis library that combines the familiarity of DataFrame operations (like those in PySpark, Pandas, and Polars) with the power of SQL query building. It provides flexible query construction without enforcing strict operation ordering, enabling developers to write intuitive and maintainable data transformations.
Documentation
use crate::CustomDataFrame;
use crate::custom_error::cust_error::{ElusionError, ElusionResult};

pub async fn write_parquet_local(
    df: &CustomDataFrame,
    output_path: &str,
    model_name: &str,
) -> ElusionResult<()> {
    let file_path = format!("{}\\{}.parquet", output_path, model_name);
    println!("💾 Writing Parquet: {}", file_path);
    df.write_to_parquet("overwrite", &file_path, None).await?;
    println!("✅ Written: {}", file_path);
    Ok(())
}

pub async fn write_delta_local(
    df: &CustomDataFrame,
    output_path: &str,
    model_name: &str,
) -> ElusionResult<()> {
    let table_path = format!("{}\\{}", output_path, model_name);
    println!("💾 Writing Delta: {}", table_path);
    df.write_to_delta_table("overwrite", &table_path, None)
        .await
        .map_err(|e| ElusionError::Custom(format!(
            "❌ Failed to write Delta table '{}': {}", table_path, e
        )))?;
    println!("✅ Written: {}", table_path);
    Ok(())
}