class RetrievalJob(ABC): (source)
Known subclasses: aligned.local.job.FileDateJob, aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.CustomPolarsJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropDuplicateEntities, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EncodeDatesJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.FillMissingColumnsJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.InMemoryCacheJob, aligned.retrieval_job.InMemorySplitCacheJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.LimitJob, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.LoadedAtJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.OnErrorJob, aligned.retrieval_job.OnLoadJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.RenameJob, aligned.retrieval_job.ReturnInvalidJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.SqlJob, aligned.retrieval_job.StackJob, aligned.retrieval_job.StreamAggregationJob, aligned.retrieval_job.SubsetJob, aligned.retrieval_job.TimeMetricLoggerJob, aligned.retrieval_job.UniqueRowsJob, aligned.retrieval_job.UnpackEmbedding, aligned.retrieval_job.UpdateVectorIndexJob, aligned.retrieval_job.ValidateEntitiesJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJob
Constructors: RetrievalJob.from_convertable(data, request), RetrievalJob.from_dict(data, request), RetrievalJob.from_lazy_function(callable, request), RetrievalJob.from_polars_df(df, request)
Undocumented
| Static Method | from |
Undocumented |
| Static Method | from |
Undocumented |
| Static Method | from |
Undocumented |
| Static Method | from |
Undocumented |
| Method | aggregate |
Undocumented |
| Method | cache |
Undocumented |
| Method | cached |
Undocumented |
| Method | chunked |
Undocumented |
| Method | combined |
Undocumented |
| Method | derive |
Undocumented |
| Method | describe |
Undocumented |
| Method | drop |
Undocumented |
| Method | drop |
Drops invalid row based on the defined features. |
| Method | ensure |
Undocumented |
| Method | fill |
Undocumented |
| Method | filter |
Filters based on a condition referencing either a feature, a feature name, or an polars expression to filter on. |
| Method | ignore |
Undocumented |
| Method | inject |
Undocumented |
| Method | join |
Undocumented |
| Method | join |
Undocumented |
| Method | limit |
Undocumented |
| Method | listen |
Undocumented |
| Method | log |
Undocumented |
| Method | monitor |
Undocumented |
| Method | on |
SomeView.query().all().on_error(ValueError, lambda e: pl.DataFrame(...)) |
| Method | on |
Undocumented |
| Method | polars |
Undocumented |
| Method | remove |
Undocumented |
| Method | rename |
Undocumented |
| Method | return |
Undocumented |
| Method | select |
Undocumented |
| Method | select |
Undocumented |
| Method | split |
Undocumented |
| Async Method | to |
Undocumented |
| Async Method | to |
Undocumented |
| Async Method | to |
Undocumented |
| Async Method | to |
Undocumented |
| Method | train |
Undocumented |
| Method | train |
Undocumented |
| Method | transform |
Undocumented |
| Method | unique |
Undocumented |
| Method | unique |
Undocumented |
| Method | unpack |
Undocumented |
| Method | update |
Undocumented |
| Method | validate |
Undocumented |
| Method | with |
Undocumented |
| Method | with |
Undocumented |
| Method | without |
Undocumented |
| Async Method | write |
Writes the output of the retrieval job to the passed source. |
| Property | loaded |
Undocumented |
| Property | request |
Undocumented |
| Property | retrieval |
Undocumented |
ConvertableToRetrievalJob, request: list[ RetrievalRequest] | RetrievalRequest | FeatureRequest) -> RetrievalJob:
(source)
¶
Undocumented
dict[ str, list], request: list[ RetrievalRequest] | RetrievalRequest) -> RetrievalJob:
(source)
¶
Undocumented
Callable[ [], Coroutine[ None, None, pl.LazyFrame]], request: RetrievalRequest) -> RetrievalJob:
(source)
¶
Undocumented
pl.DataFrame | pl.LazyFrame, request: list[ RetrievalRequest]) -> RetrievalJob:
(source)
¶
Undocumented
list[ RetrievalRequest] | None = None) -> RetrievalJob:
(source)
¶
Undocumented
list[ RetrievalRequest] | None = None) -> RetrievalJob:
(source)
¶
Undocumented
aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.LimitJob, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.OnErrorJob, aligned.retrieval_job.OnLoadJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.ReturnInvalidJob, aligned.retrieval_job.StackJobUndocumented
aligned.retrieval_job.DerivedFeatureJobDrops invalid row based on the defined features.
```python @feature_view(...) class WhiteWine:
wine_id = UInt64().as_entity()
quality = Int32().lower_bound(1).upper_bound(10)
- valid_wines = WhiteWine.drop_invalid({
- "wine_id": [0, 1, 2, 3, 4], "quality": [None, 4, 8, 20, -10]
})
print(valid_wines) >>> {
"wine_id": [1, 2], "quality": [4, 8]
}
- Args:
- validator (Validator): A validator that can validate the data.
- The default uses the
PolarsValidator
- Returns:
- RetrievalJob: A new retrieval job with only valid rows.
list[ RetrievalRequest] | None = None, date_formatter: DateFormatter | None = None) -> RetrievalJob:
(source)
¶
Undocumented
aligned.psql.jobs.PostgreSqlJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.PredictionJob, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobFilters based on a condition referencing either a feature, a feature name, or an polars expression to filter on.
aligned.psql.jobs.FactPsqlJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.SelectColumnsJobUndocumented
RetrievalJob, method: Literal[ 'inner', 'left', 'outer'], left_on: str | list[ str], right_on: str | list[ str]) -> RetrievalJob:
(source)
¶
Undocumented
RetrievalJob, left_event_timestamp: str | None = None, right_event_timestamp: str | None = None, left_on: str | list[ str] | None = None, right_on: str | list[ str] | None = None, timestamp_unit: TimeUnit = 'us') -> RetrievalJob:
(source)
¶
Undocumented
type[ ErrorType], callback: Callable[ [ ErrorType], ConvertableToRetrievalJob]) -> RetrievalJob:
(source)
¶
SomeView.query().all().on_error(ValueError, lambda e: pl.DataFrame(...))
success, error = SomeView.query().all().if_error(ValueError)
- if not error.is_empty():
- error.write_to_source(...)
- else:
- success.write_to_source(...)
Callable[ [ pl.LazyFrame], pl.LazyFrame]) -> RetrievalJob:
(source)
¶
Undocumented
aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LogJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.StreamAggregationJobUndocumented
dict[ str, str] | Callable[ [ str], str] | Renamer | None) -> RetrievalJob:
(source)
¶
Undocumented
Collection[ str | FeatureFactory]) -> RetrievalJob:
(source)
¶
Undocumented
Callable[ [ pl.DataFrame], tuple[ pl.DataFrame, pl.DataFrame]], dataset_sizes: tuple[ float, float]) -> tuple[ RetrievalJob, RetrievalJob]:
(source)
¶
Undocumented
aligned.local.job.FileDateJob, aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.CustomPolarsJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropDuplicateEntities, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EncodeDatesJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.FillMissingColumnsJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.InMemoryCacheJob, aligned.retrieval_job.InMemorySplitCacheJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.LimitJob, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.LoadedAtJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.OnErrorJob, aligned.retrieval_job.OnLoadJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.RenameJob, aligned.retrieval_job.ReturnInvalidJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.StackJob, aligned.retrieval_job.StreamAggregationJob, aligned.retrieval_job.SubsetJob, aligned.retrieval_job.TimeMetricLoggerJob, aligned.retrieval_job.UniqueRowsJob, aligned.retrieval_job.UnpackEmbedding, aligned.retrieval_job.UpdateVectorIndexJob, aligned.retrieval_job.ValidateEntitiesJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobUndocumented
aligned.local.job.FileDateJob, aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.CustomPolarsJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropDuplicateEntities, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EncodeDatesJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.FillMissingColumnsJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.InMemoryCacheJob, aligned.retrieval_job.InMemorySplitCacheJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.LimitJob, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.LoadedAtJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.OnErrorJob, aligned.retrieval_job.OnLoadJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.RenameJob, aligned.retrieval_job.ReturnInvalidJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.StackJob, aligned.retrieval_job.StreamAggregationJob, aligned.retrieval_job.SubsetJob, aligned.retrieval_job.TimeMetricLoggerJob, aligned.retrieval_job.UniqueRowsJob, aligned.retrieval_job.UnpackEmbedding, aligned.retrieval_job.UpdateVectorIndexJob, aligned.retrieval_job.ValidateEntitiesJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobUndocumented
aligned.local.job.FileFactualJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.DropDuplicateEntities, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FilteredJob, aligned.retrieval_job.LimitJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.OnErrorJob, aligned.retrieval_job.RenameJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.UniqueRowsJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobUndocumented
float, target_column: str, splitter_factory: Callable[ [ SplitConfig], SplitterCallable] | None = None) -> TrainTestJob:
(source)
¶
Undocumented
float, validate_size: float, target_column: str, splitter_factory: Callable[ [ SplitConfig], SplitterCallable] | None = None, should_filter_out_null_targets: bool = True) -> TrainTestValidateJob:
(source)
¶
Undocumented
list[ str], sort_key: str | None = None, descending: bool = True) -> RetrievalJob:
(source)
¶
Undocumented
Writes the output of the retrieval job to the passed source.
```python redis_cluster = RedisConfig.localhost()
store = FeatureStore.from_dir(".")
- await (store.model("taxi")
- .all_predictions() # Reads predictions from a
prediction_source.write_to_source(redis_cluster)
)
```
- Args:
- source (WritableFeatureSource): A source that we can write to.
aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.retrieval_job.LiteralDictJobUndocumented
aligned.local.job.FileDateJob, aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.LoadedAtJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.StackJob, aligned.retrieval_job.UpdateVectorIndexJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobUndocumented
aligned.local.job.FileDateJob, aligned.local.job.FileFactualJob, aligned.local.job.FileFullJob, aligned.local.job.LiteralRetrievalJob, aligned.psql.jobs.FactPsqlJob, aligned.psql.jobs.PostgreSqlJob, aligned.redis.job.FactualRedisJob, aligned.redshift.jobs.FactRedshiftJob, aligned.redshift.sql_job.RedshiftSqlJob, aligned.retrieval_job.AggregateJob, aligned.retrieval_job.CombineFactualJob, aligned.retrieval_job.CustomLazyPolarsJob, aligned.retrieval_job.DerivedFeatureJob, aligned.retrieval_job.DropInvalidJob, aligned.retrieval_job.EnsureTypesJob, aligned.retrieval_job.FileCachedJob, aligned.retrieval_job.JoinAsofJob, aligned.retrieval_job.JoinJobs, aligned.retrieval_job.ListenForTriggers, aligned.retrieval_job.LiteralDictJob, aligned.retrieval_job.LoadedAtJob, aligned.retrieval_job.LogJob, aligned.retrieval_job.PredictionJob, aligned.retrieval_job.RawFileCachedJob, aligned.retrieval_job.SelectColumnsJob, aligned.retrieval_job.StackJob, aligned.retrieval_job.UpdateVectorIndexJob, aligned.retrieval_job.WithRequests, aligned.sources.databricks.UCSqlJob, aligned.sources.databricks.UnityCatalogTableAllJobUndocumented