The ttl (time-to-live) Parameter in Feature Views
The value of
ttl affects the availability of feature data in the online store,
the generation of training feature data, and the deletion of feature values from
the online store.
ttl specifies the amount of time, prior to the current time, for which feature
data should be available in the online store. At materialization time, feature
data with timestamps earlier than the current time minus the
ttl value are not
written to the online store. Tecton never writes feature data with timestamps
feature_start_time to the online store. So Tecton writes features
as far back as the
max(feature_start_time, current time - ttl) to the online
ttl is a Batch and Stream Feature View parameter, as well as a Feature Table
For a Feature View that contains one or more
Aggregations, the Feature View's
ttl value is implicity set to the
ttl on the materialization of feature data into the online store
ttl value can increase the amount and throughput of data
written to the online store. and may affect availability for reads from the
ttl on the availability of feature data in the online store
ttl specifies the amount of time, prior to the current time, that feature data
is available in the online store. Feature data with timestamps earlier than the
current time minus the
ttl value will expire.
ttl on the generation of training feature data
ttl specifies the maximum amount of time prior to the timestamp of a training
event, that data in a Feature View's data source is available for generating
feature data for the training event.
ttl values will allow
get_historical_features() to run more
efficiently in some cases, because the amount of training data generated will be
ttl on the deletion of a feature value from the online store
A feature value is deleted from the online store when all of the following conditions are met:
- The feature value has expired from the online store (because the feature
value's timestamp is earlier than the current time minus the
- The online store is running on Redis and the Feature View was created after August 3, 2022.
- For a non-aggregate feature value:
current time - feature row timestamp > ttl + 7 days.
- For an aggregate feature value:
current time - timestamp of the feature value > aggregation_interval + longest time_window + 7 days.
ttl values will reduce feature data storage costs.
If there is more than a 7 day gap between the current time and the last time a
Feature View's values were written to the online store, some of the Feature
View's values not exceeding the
ttl period may be automatically deleted from
the online store. In this case, these values will be null. For assistance with
this situation, contact Tecton Support for assistance.
ttl has no effect on deletion of feature values from the offline store. To
delete values from the offline store, use the