PrimitiveRef
A primitive data source referenced within a concept definition.
Specifies the expected Memintel type of the primitive and how to handle missing data. The actual source configuration (connector, SQL query, etc.) lives in the registered primitive config (memintel.config.md / PrimitiveConfig) — this ref only declares the contract the concept author expects.
missing_data_policy resolves output nullability at compile time: None / 'null' → T? (null propagates) 'zero' → T (null replaced with 0) 'forward_fill' → T (null replaced with last known value) 'backward_fill' → T (null replaced with next known value)
labels must be declared when type is 'categorical'. The compiler validates that all execution paths produce only the declared labels (§5 of type spec).
missing_data_policy object
- MissingDataPolicy
- null
Policy applied when a primitive fetch returns no data for an entity.
null — return null (T?); downstream operators must handle nullable zero — substitute 0; forces non-nullable output forward_fill — use last known value (non-nullable) backward_fill — use next known value (non-nullable)
Specified per-request to override per-primitive defaults.
Possible values: [null, zero, forward_fill, backward_fill]
labels object
- string[]
- null
{
"type": "string",
"missing_data_policy": "null",
"labels": [
"string"
]
}