Crate csv_ingest

Crate csv_ingest 

Source
Expand description

Streaming CSV ingestion with optional fast local path.

  • Streaming path: works with local files and gzip/zstd.
  • Fast local path: feature fast_local, uncompressed local UTF-8 only.

Data shape:

  • CsvIngestSummary { row_count, headers }
  • Streaming rows: csv_async::ByteRecord (access with get(idx) -> Option<&[u8]>)

Structs§

CsvIngestSummary
Result summary (keep it simple/minimal)
CsvMeta

Enums§

CsvIngestError
Error type returned by this crate when not using anyhow.

Functions§

build_csv_reader
From a generic AsyncRead, wrap with optional decompression and UTF-8 transcoding. Returns an AsyncRead suitable for csv_async plus the normalized meta we used.
fast_local_process
Fast local parser for uncompressed UTF-8 CSV files using mmap and parallel chunking. Assumptions: UTF-8, no embedded newlines in quoted fields.
process_csv_stream
Streaming parse with required header validation. This mirrors your existing logic as closely as possible.
reader_from_path
Build a reader from a local file path (lightweight meta from extension).

Type Aliases§

CsvResult