Types¶
A few types used in Metaxy here and there.
LazyIncrement
¶
Bases: NamedTuple
Result of resolving an incremental update with lazy Narwhals LazyFrames.
Attributes:
-
added(LazyFrame[Any]) –New samples that appear upstream and haven't been processed yet.
Columns:
[*user_defined_columns, "metaxy_provenance_by_field"] -
changed(LazyFrame[Any]) –Samples with new field provenance that should be re-processed.
Columns:
[*user_defined_columns, "metaxy_provenance_by_field"] -
removed(LazyFrame[Any]) –Samples that have been previously processed but have been removed from upstream since that.
Columns:
[*id_columns, "metaxy_provenance_by_field"]
Note
added and changed contain all the user-defined columns, but removed only contains the ID columns.
Increment
¶
Bases: NamedTuple
Result of resolving an incremental update with eager Narwhals DataFrames.
Contains materialized Narwhals DataFrames.
Users can convert to their preferred format: - Polars: result.added.to_native()
Attributes:
-
added(DataFrame[Any]) –New samples that appear upstream and haven't been processed yet.
Columns:
[*user_defined_columns, "metaxy_provenance_by_field"] -
changed(DataFrame[Any]) –Samples with new field provenance that should be re-processed.
Columns:
[*user_defined_columns, "metaxy_provenance_by_field"] -
removed(DataFrame[Any]) –Samples that have been previously processed but have been removed from upstream since that.
Columns:
[*id_columns, "metaxy_provenance_by_field"]
Note
added and changed contain all the user-defined columns, but removed only contains the ID columns.
HashAlgorithm
¶
SnapshotPushResult
¶
Bases: NamedTuple
Result of recording a feature graph snapshot.
Attributes:
-
snapshot_version(str) –The deterministic hash of the graph snapshot
-
already_recorded(bool) –True if computational changes were already recorded
-
metadata_changed(bool) –True if metadata-only changes were detected
-
features_with_spec_changes(list[str]) –List of feature keys with spec version changes