How to backfill offline store with UDF-transformed data for StreamFeatureView?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- kafka, python
调研方向
首先跟踪 StreamProcessor.ingest 和 materialize(),然后将它们的行为与 get_historical_features() 和 write_to_offline_store() 进行比较。检查 batch_source parquet 和本地离线存储的读取和写入方式。完成的标准是,项目为 UDF 转换的数据提供一个有文档说明或受支持的回填工作流,且不会重复转换、产生重复数据或丧失幂等性。
由索引模型根据 Issue 内容生成。
描述
Background
I'm using StreamFeatureView with KafkaSource + local provider. The real-time ingestion path works well — StreamProcessor.ingest_stream_feature_view(to=ONLINE_AND_OFFLINE) consumes from Kafka, applies the pandas UDF, and writes transformed features to both online and offline stores.
Now I need to backfill historical data that predates the streaming pipeline. I have raw Kafka history available via ETL export, but I'm not sure what the recommended approach is to get UDF-transformed features into the offline store.
My setup
@stream_feature_view(
source=kafka_source, # KafkaSource with batch_source=FileSource(parquet)
mode="pandas",
udf=my_udf, # computes derived features (e.g. aggregations, flags) from raw fields
)
def my_features(df): ...
What I've tried
1. ETL export + materialize()
Export raw Kafka history to batch_source parquet, then call store.materialize(start, end).
This reads the batch_source, applies the UDF, and writes to the online store — but the offline store is not updated. After materialize(), calling get_historical_features() still returns raw data without the UDF-computed derived features.
2. Re-ingest via StreamProcessor from Kafka
Use StreamProcessor.ingest(to=ONLINE_AND_OFFLINE) with offset reset to consume historical messages.
This only works within Kafka's retention window and doesn't scale for large history.
Questions
-
Is there a recommended way to backfill the offline store with UDF-transformed data? I want the UDF defined on the StreamFeatureView to be the single source of truth, avoiding duplication in ETL scripts.
-
Does
materialize()intentionally skip the offline store? If so, what is the expected workflow for keeping the offline store in sync with UDF-transformed features after a historical backfill? -
Batch_source and offline store are the same file — For local/file-based offline stores,
materialize()reads from thebatch_sourceparquet, which is the same file thatwrite_to_offline_store()writes to. Even ifmaterialize()were extended to write back to the offline store, this would create problems:- UDF applied twice on subsequent runs (transformed rows re-read and re-transformed)
- Data duplication (raw + transformed rows coexist)
- Idempotency broken (each run appends more duplicates)
Is separating the batch_source (raw input) from the offline store (transformed output) something that has been considered? Or is there an existing pattern I'm missing?
Any guidance or pointers would be greatly appreciated! I may well be missing something in the existing workflow.
- 主要语言
- Python
- 星标
- 7.4k
- 派生
- 1.5k
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 107
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
feast-dev/feast 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
BigQuery data quality monitoring fails: PRIMARY KEY placed outside the column list in monitoring table DDL可能已有人在做 @liron-velocity 于 50 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
get_online_features silently drops a join key value when it shares a name with an OnDemandFeatureView's RequestSource field可能已有人在做 @OHMFOHS 于 99 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
kind/bug priority/p2
难度 1/5 1 小时以内 新手友好度 90/100
feast-dev/feast#6778 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
accepted
难度 2/5 1-3 小时 新手友好度 68/100
future-agi/future-agi#6392 ·
维护者通常 1 天内回复
-
memmapped_arange ignores the start value and drops the last point above the memmap threshold可能已有人在做 @prathameshfuke 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
StingraySoftware/HENDRICS#213 ·
-
Bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复