Artifacts¶
An artifact is Artigraph's contract for a data product. It says what the data represents, how it is serialized, where it lives, and what human or quality metadata is attached to it.
from arti import Artifact, Format, Storage, Type
from arti.formats.json import JSON
from arti.storage.local import LocalFile
from arti.types import Float64
class TotalSpend(Artifact):
type: Type = Float64()
format: Format = JSON()
storage: Storage = LocalFile()
Artifact fields¶
typedescribes the logical shape of the data: scalar, struct, collection, partitions, and field types.formatdescribes how the data is serialized, such as JSON or Parquet.storagedescribes where bytes are stored, such as a local file path template.annotationsattach domain metadata that should travel with the artifact definition.statisticsare intended for measured characteristics and quality signals.
Raw and produced artifacts¶
Raw artifacts point at data that already exists or is written by the user. Produced artifacts are the
outputs of producers. Produced artifact storage should include Artigraph's input fingerprint template,
{input_fingerprint}, so that multiple versions can remain available at the same time:
That version-preserving behavior is the foundation for reproducible snapshots: a corrected input can produce a new output without deleting the output that belonged to an older graph snapshot.