Title: Stream transformations · Issue #2597 · feast-dev/feast · GitHub
Open Graph Title: Stream transformations · Issue #2597 · feast-dev/feast
X Title: Stream transformations · Issue #2597 · feast-dev/feast
Description: Note: Users can push streaming features to the online store via push sources Note: RFC can be found here. See also: Feast Slack: #feast-feature-transformations Requirements Problem 1 Data scientists cannot meaningfully author event-backe...
Open Graph Description: Note: Users can push streaming features to the online store via push sources Note: RFC can be found here. See also: Feast Slack: #feast-feature-transformations Requirements Problem 1 Data scientist...
X Description: Note: Users can push streaming features to the online store via push sources Note: RFC can be found here. See also: Feast Slack: #feast-feature-transformations Requirements Problem 1 Data scientist...
Opengraph URL: https://github.com/feast-dev/feast/issues/2597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stream transformations","articleBody":"**Note:** Users can push streaming features to the online store via [push sources](https://docs.feast.dev/reference/data-sources/push)\n**Note:** [RFC](https://docs.google.com/document/d/1UzEyETHUaGpn0ap4G82DHluiCj7zEbrQLkJJkKSv4e8/edit#) can be found here.\n**See also**: [Feast Slack: #feast-feature-transformations](https://tectonfeast.slack.com/archives/C03A2CH7GAG)\n\n## Requirements\n### Problem 1\nData scientists cannot meaningfully author event-backed features that will be fresh at serving time. \n\nOften, right now data scientists will define a feature, and then work with engineers to build that streaming pipeline to push to the online store. There is a tight coupling and engineering bottleneck to reach production. \n\n### Problem 2\nUsers cannot guarantee consistent feature transformations across batch + streaming contexts. If they author a SQL transformation in batch, and a PySpark transformation for streaming, they may have inconsistencies.\n- This problem is also related to versioning transformation logic within Feast. If both batch + stream transformation logic is present, it is easier to ensure they are consistent. An ML platform team can also build a custom feature view that only requires one transformation to be defined, but map to different semantics in batch vs streaming.\n\n### Problem 3\nUsers cannot version transformation logic and tie it to downstream models (a lineage problem). It's useful to see what models may be impacted by changing some stream transformation / aggregation logic, and perhaps allow for A/B experiments using different transformations.\n\n## Potential solution\n### Types of transformations\nWe should support defining both:\n- stateless transformations (e.g. row level transforms / mapping)\n- stateful transformations (e.g. windowed transformations)\n\n### Data scientist developer experience\nIt should be easy for a data scientist to correctly author stream transformations (including aggregations). \n- One way is to introduce a higher level DSL for aggregation logic. \n- Another way is to allow streaming some sample data in, applying the transformation, and seeing the input vs output.\n\n### Example feature view\n```python\n@stream_feature_view(\n name=\"driver_stats\",\n entities=[driver],\n mode=\"spark_sql\",\n aggregations=[\n Aggregation(\n column='distance',\n function='mean', \n time_windows=[timedelta(days=7)] \n )\n ],\n aggregation_interval=timedelta(days=1),\n source=driver_stats_stream_source,\n)\ndef driver_stats(driver_stats_stream_source):\n return f'''\n SELECT\n driver_id,\n distance as most_recent_trip_distance,\n duration as most_recent_trip_duration,\n event_timestamp,\n FROM\n {driver_stats_stream_source}\n '''\n```\n## Alternatives considered\n- Kicking off long running jobs that ingests events, transforms (Spark, Flink, Bytewax, etc), and writes to the online stores.","author":{"url":"https://github.com/adchia","@type":"Person","name":"adchia"},"datePublished":"2022-04-21T22:48:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2597/feast/issues/2597"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bfddf9b8-8743-5e47-8167-7aef12b9f639 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACA6:391A54:15CC01F:1E5C232:6A4DF463 |
| html-safe-nonce | 46fa533c108035ff83a75340474db1d0d418e2baf12707b29eefce5896953a73 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0E2OjM5MUE1NDoxNUNDMDFGOjFFNUMyMzI6NkE0REY0NjMiLCJ2aXNpdG9yX2lkIjoiMjU2MjkwNzk5MjA1MjU5Mzc2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c26cac279fd03af8ccf82a2a10fe012bf792b4318925b996bcb2086f81f47e39 |
| hovercard-subject-tag | issue:1211625292 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/2597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/887ac0cd3e82cf43b99b0a49fcf2e8ba546d97d9339205c844b3fb1326562614/feast-dev/feast/issues/2597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/887ac0cd3e82cf43b99b0a49fcf2e8ba546d97d9339205c844b3fb1326562614/feast-dev/feast/issues/2597 |
| og:image:alt | Note: Users can push streaming features to the online store via push sources Note: RFC can be found here. See also: Feast Slack: #feast-feature-transformations Requirements Problem 1 Data scientist... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adchia |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width