FailureInfo.sink_parquet#

FailureInfo.sink_parquet(
file: str | Path | IO[bytes] | PartitionBy,
**kwargs: Any,
) None[source]#

Stream the failure info to a single parquet file.

Writes the invalid rows along with additional boolean rule columns indicating which validation rules failed. Unlike invalid(), this includes columns for each rule, where False indicates the rule failed for that row.

Parameters:
  • file – The file path or writable file-like object to which to write the parquet file. This should be a path to a directory if writing a partitioned dataset.

  • kwargs – Additional keyword arguments passed directly to polars.sink_parquet(). metadata may only be provided if it is a dictionary.

Attention

Be aware that this method suffers from the same limitations as Schema.serialize().