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 withget(idx) -> Option<&[u8]>
)
Structs§
- CsvIngest
Summary - Result summary (keep it simple/minimal)
- CsvMeta
Enums§
- CsvIngest
Error - 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).