Skip to content

voiage.ingestion.base.SourceAccessPolicy

Fail-closed local source policy for descriptor-relative resources.

validate_tabular_batch([positional or keyword] self: None = None, [keyword-only] batch_rows: int = None, [keyword-only] total_rows: int = None) -> None

Reject an oversized parsed batch before it becomes an Arrow table.

Built-in delimited-text providers use Arrow’s streaming CSV reader and call this method for each record batch before retaining it. This keeps the policy at the source boundary rather than letting an unbounded table reach normalization or calculation code.

Parameters:

  • self
  • batch_rows int
  • total_rows int

Returns: None

resolve([positional or keyword] self: None = None, [positional or keyword] reference: str = None) -> Path

Resolve a relative local reference without allowing path traversal.

Parameters:

  • self
  • reference str

Returns: Path

materialize([positional or keyword] self: None = None, [positional or keyword] reference: str = None, [keyword-only] sha256: str | None = None, [keyword-only] byte_size: int | None = None) -> Path

Return a digest-verified local materialization, optionally from cache.

This method never performs network I/O. Offline replay is intentionally possible only with an expected digest, so a mutable source cannot be silently substituted for a previously reviewed materialization.

Parameters:

  • self
  • reference str
  • sha256 str | None (default: None)
  • byte_size int | None (default: None)

Returns: Path

source_uri([positional or keyword] self: None = None, [positional or keyword] reference: str = None) -> str

Return the validated logical local URI without requiring the source.

Parameters:

  • self
  • reference str

Returns: str