kernels.peek_kind()

The artifact type, read from the stream’s schema message.

Usage

Source

kernels.peek_kind(data)

What this saves is the DECODE, not the read. A router can dispatch a payload it is about to hand somewhere else without ever reconstructing the pandas frames and numpy arrays inside it - but it is not a cheap peek at a small prefix, and how little it reads depends entirely on the kind. For PredictiveDistribution, MackFit, CDRResult and Triangle the payload sits in record batches AFTER the schema, so this touches almost none of it. For DataFrame, ForecastPanel and MackFitPanel the body table is empty and the entire payload rides in the schema metadata as nested streams, so this reads 100% of the bytes - it simply does not unpack any of them.