pub async fn parse_parquet_stream(
__arg0: State<AppState>,
__arg1: Query<ParseQuery>,
multipart: Option<Multipart>,
) -> Result<Response, ApiError>Expand description
POST /api/v1/parse/parquet-stream - Streaming parse with Parquet batches.
Returns SSE events with Parquet-encoded geometry batches for progressive rendering. Each batch can be decoded and rendered immediately without waiting for the full response.
Events:
start: Initial event withtotal_estimateandcache_keyprogress: Progress updates withprocessedandtotalcountsbatch: Geometry batch with base64-encoded Parquetdata,mesh_count,batch_numbercomplete: Final event withstatsandmetadataerror: Error event withmessage
After complete, client should fetch data model via /api/v1/data-model/{cache_key}.
§Two ways to ask
With a multipart file body: the normal path. The cache key is the SHA-256
of the RECEIVED bytes, so the upload always completes first, and a sha256
query parameter sent alongside a body is IGNORED - the bytes on the wire
decide which entry is read and written, never the client’s claim about them.
With ?sha256={hex} and no body: a probe (issue #3901). It replays the
cached stream if, and only if, every entry the replay needs already exists
under that key, and otherwise answers 404 meaning “upload it”. See
[cached_replay::replay_by_client_hash]. This is what lets a 40 MB cache
hit cost no upload.