stamp_parquet_schema_metadata
Documentation for eth_defi.version_info.stamp_parquet_schema_metadata function.
- stamp_parquet_schema_metadata(schema, version_info=None)
Add vault-scanner build provenance to a PyArrow schema.
Preserves existing schema metadata, such as pandas’ column-index metadata, while replacing the scanner’s version stamp with the version of the code currently writing the file. Use this for every scanner-produced Parquet artefact so raw, cleaned, and sample price data can be traced to the same Docker build as the JSON exports.
- Parameters
schema (Any) – PyArrow schema to stamp.
Anyavoids imposing a runtime PyArrow dependency on the lightweight version-information module.version_info (Optional[eth_defi.version_info.VersionInfo]) – Optional explicit version for tests or specialised callers. When omitted, reads the Docker image stamp of the current process.
- Returns
A copy of
schemawithmetadata.versionprovenance metadata.- Return type