wiring.quarantine_path()

Return the path of the parquet file file_writer writes an asset’s invalid rows to.

Usage

Source

wiring.quarantine_path(
    key,
    quarantine_dir,
    partition_key=None,
)

The layout matches UPathIOManager’s, so with quarantine_dir set to a manager’s base_dir, the file is beside the asset’s own file.

Parameters

key: dg.AssetKey

The asset key of the asset whose rows failed validation, not the quarantine’s key.

quarantine_dir: UPath | Path | str

Any path UPath accepts, such as a local directory or s3://bucket/prefix. Credentials for a remote path come from the environment.

partition_key: str | None = None
A dg.MultiPartitionKey becomes its dimension keys joined by /, in dimension-name order. Escaping a .. and a leading / keeps the file under quarantine_dir.

Returns

<quarantine_dir>/<key part>/.../<name>_quarantine.parquet, or <quarantine_dir>/<key part>/.../<name>_quarantine/<partition>.parquet for a partition. quarantine_path creates no parent directories.