Skip to main content

infer_schema

Function infer_schema 

Source
pub fn infer_schema(path: &Path) -> Result<Schema, SchemaInferError>
Expand description

Infer the Arrow schema from a data file by extension.

Dispatches to the appropriate reader based on file extension:

  • .csv → CSV header + sample inference
  • .json / .ndjson → JSON schema inference
  • .parquet → Parquet footer metadata

Only reads the minimum data needed (header/sample rows/footer), not the full file.