Skip to content

Constants

Constants

Shared constants for system-managed column names.

All system columns use the metaxy_ prefix to avoid conflicts with user columns.

Attributes

metaxy.models.constants.DEFAULT_CODE_VERSION module-attribute

DEFAULT_CODE_VERSION = '__metaxy_initial__'

metaxy.models.constants.SYSTEM_COLUMN_PREFIX module-attribute

SYSTEM_COLUMN_PREFIX = 'metaxy_'

metaxy.models.constants.METAXY_PROVENANCE_BY_FIELD module-attribute

METAXY_PROVENANCE_BY_FIELD = (
    f"{SYSTEM_COLUMN_PREFIX}provenance_by_field"
)

Field-level provenance hashes (struct column mapping field names to hashes).

metaxy.models.constants.METAXY_PROVENANCE module-attribute

METAXY_PROVENANCE = f'{SYSTEM_COLUMN_PREFIX}provenance'

Hash ofmetaxy_provenance_by_field -- a single string value.

metaxy.models.constants.METAXY_FEATURE_VERSION module-attribute

METAXY_FEATURE_VERSION = (
    f"{SYSTEM_COLUMN_PREFIX}feature_version"
)

Hash of the feature definition (dependencies + fields + code_versions).

metaxy.models.constants.METAXY_PROJECT_VERSION module-attribute

METAXY_PROJECT_VERSION = (
    f"{SYSTEM_COLUMN_PREFIX}project_version"
)

Hash of the entire feature graph project version (recorded during deployment).

metaxy.models.constants.METAXY_DEFINITION_VERSION module-attribute

METAXY_DEFINITION_VERSION = (
    f"{SYSTEM_COLUMN_PREFIX}definition_version"
)

Hash of the complete feature definition including Pydantic schema and feature spec.

This comprehensive hash captures the feature definition (excluding project): - Pydantic model schema (field types, descriptions, validators, serializers, etc.) - Feature specification (dependencies, fields, code_versions, metadata)

Project is stored separately. Used in system tables to detect when ANY part of a feature changes.

metaxy.models.constants.METAXY_DATA_VERSION_BY_FIELD module-attribute

METAXY_DATA_VERSION_BY_FIELD = (
    f"{SYSTEM_COLUMN_PREFIX}data_version_by_field"
)

Field-level data version hashes (struct column mapping field names to version hashes).

Similar to provenance_by_field, but can be user-overridden to implement custom versioning (e.g., content hashes, timestamps, semantic versions).

metaxy.models.constants.METAXY_DATA_VERSION module-attribute

METAXY_DATA_VERSION = f'{SYSTEM_COLUMN_PREFIX}data_version'

Hash of metaxy_data_version_by_field -- a single string value.

metaxy.models.constants.METAXY_CREATED_AT module-attribute

METAXY_CREATED_AT = f'{SYSTEM_COLUMN_PREFIX}created_at'

Timestamp when the metadata row was created.

metaxy.models.constants.METAXY_UPDATED_AT module-attribute

METAXY_UPDATED_AT = f'{SYSTEM_COLUMN_PREFIX}updated_at'

Timestamp when the metadata row was last updated (written to the store).

metaxy.models.constants.METAXY_DELETED_AT module-attribute

METAXY_DELETED_AT = f'{SYSTEM_COLUMN_PREFIX}deleted_at'

Timestamp when the metadata row was soft-deleted.

metaxy.models.constants.METAXY_MATERIALIZATION_ID module-attribute

METAXY_MATERIALIZATION_ID = (
    f"{SYSTEM_COLUMN_PREFIX}materialization_id"
)

External orchestration run ID (e.g., Dagster Run ID, Airflow Run ID) for tracking pipeline executions.

metaxy.models.constants.ALL_SYSTEM_COLUMNS module-attribute

All Metaxy-managed column names that are injected into feature tables.

metaxy.models.constants._COLUMNS_TO_DROP_BEFORE_JOIN module-attribute

metaxy.models.constants.SYSTEM_COLUMNS_WITH_LINEAGE module-attribute