Filters and Operators
PQL separates the entities to score from the historical context used to form a prediction.
FORand theindicesparameter select the entities for which to generate predictions.WHEREfilters the historical context.ASSUMINGconditions the prediction on a hypothetical attribute value.
Select entities
Specify an explicit key or list of keys in the query:
For a programmatically generated list, pass the keys through materialize(indices=...):
indices overrides keys embedded in the query. A materialize() call accepts up to 100,000 keys, gathered as up to 100 NIM calls.
Filter which context examples qualify
A temporal WHERE clause selects which entity/anchor rows become labeled context examples; it does not remove individual historical events from the related tables, and it does not narrow explicitly scored indices:
The WHERE clause retains as context examples the entities that had at least one order during the 30 days before the anchor time.
Current Kumo Relational static column filters are limited to columns in the same table. Joined static filters described by broader PQL grammars are not supported by the current validator.
Combine conditions
Use AND, OR, and NOT with type-compatible expressions:
Start with one condition, and add other conditions only after the base query succeeds.
Set the anchor time
The anchor time defines “now” for temporal windows. Pass time controls to materialize():
An explicit historical anchor time is useful for backtesting. Ensure that both features and labels comply with the time boundary.
You can specify separate anchors for prediction and context:
Verify that the deployed SDK and NIM versions support the optional inference controls.
sdm-client automatically drops from the context any row that is a scored row itself, at the moment it answers the question being asked — with a warning naming how many rows were removed. You do not need to hand-craft WHERE and anchor-time logic solely to prevent that specific leak.
Condition with ASSUMING
ASSUMING conditions the prediction on in-context examples that have the specified value. It does not estimate a causal treatment effect and must not be interpreted as proof that changing the attribute will cause the predicted outcome.
Use an assumed state only when it has adequate historical representation. Check the stability of the results across related cohorts, protect sensitive attributes, and do not use an assumed association as the sole basis for a high-stakes decision.