{"id":20408729,"url":"https://github.com/feast-dev/feast-demo","last_synced_at":"2025-07-25T00:42:47.549Z","repository":{"id":47327208,"uuid":"408531337","full_name":"feast-dev/feast-demo","owner":"feast-dev","description":"Feast demo repository including use of on demand feature views and stream ingestion","archived":false,"fork":false,"pushed_at":"2022-08-03T20:17:34.000Z","size":103,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-26T10:05:28.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feast-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-20T17:08:07.000Z","updated_at":"2023-10-05T14:18:14.000Z","dependencies_parsed_at":"2022-09-09T02:11:46.112Z","dependency_job_id":null,"html_url":"https://github.com/feast-dev/feast-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feast-dev%2Ffeast-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feast-dev%2Ffeast-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feast-dev%2Ffeast-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feast-dev%2Ffeast-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feast-dev","download_url":"https://codeload.github.com/feast-dev/feast-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590145,"owners_count":21129757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T05:35:54.691Z","updated_at":"2025-04-12T15:35:35.670Z","avatar_url":"https://github.com/feast-dev.png","language":"Python","readme":"# Feast demo\n\n## Overview\n\nThis tutorial demonstrates the use of on demand feature views and stream ingestion in Feast. It extends the Feast default demo data to\ninclude on demand transformations and pushing to the online store from stream events.\n\nIt also includes miscellaneous code samples for embedding in tutorials / blog posts.\n\n## Setup\n\n### Setting up Feast\n\nInstall Feast using pip\n\n```\npip install feast\n```\n\nWe have already set up a feature repository in [feature_repo/](feature_repo/). \n\nDeploy the feature store by running `apply` from within the `feature_repo/` folder\n```\ncd feature_repo/\nfeast apply\n```\n\nOutput:\n```\nCreated entity driver\nCreated feature view driver_hourly_stats\nCreated on demand feature view transformed_conv_rate\n\nCreated sqlite table feast_demo_driver_hourly_stats\n```\n\nNext we load features into the online store using the `materialize-incremental` command. This command will load the\nlatest feature values from a data source into the online store.\n\n```\nCURRENT_TIME=$(date -u +\"%Y-%m-%dT%H:%M:%S\")\nfeast materialize-incremental $CURRENT_TIME\n```\n\nOutput:\n```\nMaterializing 1 feature views to 2021-09-20 13:36:06-04:00 into the sqlite online store.\n\ndriver_hourly_stats from 2021-06-12 17:43:32-04:00 to 2021-09-20 13:36:06-04:00:\n100%|███████████████████████████████████████████████████████████████| 5/5 [00:00\u003c00:00, 1509.29it/s]\n```\n\n## Fetch features\n\n```\npython get_features_demo.py\n```\n\nOutput:\n```\n--- Historical features ---\n      driver_id           event_timestamp  val_to_add  val_to_add_2 string_feature  conv_rate  acc_rate  avg_daily_trips  conv_rate_plus_val1  conv_rate_plus_val2\n360        1001 2021-04-12 10:59:42+00:00           1            10           test   0.701558  0.195824              566             1.701558            10.701558\n721        1002 2021-04-12 08:12:10+00:00           2            20           test   0.775499  0.947109              890             2.775499            20.775499\n1082       1003 2021-04-12 16:40:26+00:00           3            30           test   0.186658  0.245490              971             3.186658            30.186658\n1445       1004 2021-04-12 15:01:12+00:00           4            40           test   0.891017  0.118256              154             4.891017            40.891017\n\n--- Online features ---\nacc_rate  :  [0.8408732414245605]\navg_daily_trips  :  [714]\nconv_rate_plus_val1  :  [1000.8123571872711]\nconv_rate_plus_val2  :  [2000.8123571872711]\ndriver_id  :  [1001]\nstring_feature  :  ['test']\n\n--- Simulate a stream event ingestion of the hourly stats df ---\n   driver_id     event_timestamp             created  conv_rate  acc_rate  avg_daily_trips string_feature\n0       1001 2021-05-13 10:59:42 2021-05-13 10:59:42        1.0       1.0             1000          test2\n\n--- Online features again with updated values---\nacc_rate  :  [1.0]\navg_daily_trips  :  [1000]\nconv_rate_plus_val1  :  [1001.0]\nconv_rate_plus_val2  :  [2001.0]\ndriver_id  :  [1001]\nstring_feature  :  ['test2']\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeast-dev%2Ffeast-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeast-dev%2Ffeast-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeast-dev%2Ffeast-demo/lists"}