Title: Bug: _materialize_odfv uses entity names instead of join keys · Issue #5965 · feast-dev/feast · GitHub
Open Graph Title: Bug: _materialize_odfv uses entity names instead of join keys · Issue #5965 · feast-dev/feast
X Title: Bug: _materialize_odfv uses entity names instead of join keys · Issue #5965 · feast-dev/feast
Description: Summary FeatureStore._materialize_odfv uses source_fv.entities (entity names) instead of source_fv.join_keys (join key column names) when building BigQuery queries. This causes materialization to fail when an entity's name differs from i...
Open Graph Description: Summary FeatureStore._materialize_odfv uses source_fv.entities (entity names) instead of source_fv.join_keys (join key column names) when building BigQuery queries. This causes materialization to f...
X Description: Summary FeatureStore._materialize_odfv uses source_fv.entities (entity names) instead of source_fv.join_keys (join key column names) when building BigQuery queries. This causes materialization to f...
Opengraph URL: https://github.com/feast-dev/feast/issues/5965
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: _materialize_odfv uses entity names instead of join keys","articleBody":"## Summary\n\n`FeatureStore._materialize_odfv` uses `source_fv.entities` (entity **names**) instead of `source_fv.join_keys` (join key **column names**) when building BigQuery queries. This causes materialization to fail when an entity's name differs from its join key.\n\n## Steps to Reproduce\n\n1. Define an entity where name ≠ join key:\n```python\ncreator = Entity(\n name=\"creator\",\n join_keys=[\"creator_id\"],\n value_type=ValueType.STRING,\n)\n```\n\n2. Define a FeatureView using that entity, and an OnDemandFeatureView sourcing from it with `write_to_online_store=True`.\n\n3. Run `store.materialize_incremental(...)`.\n\n## Expected Behavior\n\nThe generated BigQuery SQL should reference `creator_id` (the join key column).\n\n## Actual Behavior\n\nThe SQL references `creator` (the entity name), which doesn't exist as a column:\n\n```\ngoogle.api_core.exceptions.BadRequest: 400 Unrecognized name: creator;\nDid you mean creator_id? at [6:24]\n```\n\n## Root Cause\n\nIn [`feature_store.py` `_materialize_odfv`](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/feature_store.py), two lines use `.entities` (names) where they should use `.join_keys` (column names):\n\n- **Line 1354**: `all_join_keys.update(source_fv.entities)` → should be `source_fv.join_keys`\n- **Line 1394**: `join_key_columns=source_fv.entities` → should be `source_fv.join_keys`\n\n`FeatureView.entities` returns `[e.name for e in entities]` (entity names), while `FeatureView.join_keys` returns `[e.name for e in self.entity_columns]` (actual column names). When these differ, the query fails.\n\nNote: regular `materialize_single_feature_view` does not have this bug because it resolves join keys correctly through the provider layer.\n\n## Suggested Fix\n\n```diff\n for source_fv in source_fvs:\n- all_join_keys.update(source_fv.entities)\n+ all_join_keys.update(source_fv.join_keys)\n if source_fv.batch_source:\n entity_timestamp_col_names.add(source_fv.batch_source.timestamp_field)\n```\n\n```diff\n job = provider.offline_store.pull_latest_from_table_or_query(\n config=self.config,\n data_source=source_fv.batch_source,\n- join_key_columns=source_fv.entities,\n+ join_key_columns=source_fv.join_keys,\n feature_name_columns=[f.name for f in source_fv.features],\n```\n\n## Environment\n\n- Feast version: 0.58.0\n- Offline store: BigQuery","author":{"url":"https://github.com/max36067","@type":"Person","name":"max36067"},"datePublished":"2026-02-13T07:59:15Z","url":"https://github.com/feast-dev/feast/issues/5965"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:8d00bed8-f406-9f20-de5f-13ec2b48b364 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8F8:498F8:2DACF8:3F397A:6AFE9812 |
| html-safe-nonce | b1c3fbf01c256469f225bef442e43972fbe3a113fafe35b473abc0ce421275df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEY4OjQ5OEY4OjJEQUNGODozRjM5N0E6NkFGRTk4MTIiLCJ2aXNpdG9yX2lkIjoiNzYxNTYxMjA0NTY5NzY1Mjc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7bcf187d12dcc258ff5baf950c481f137ab0f6e95fb5b2d44ec4740a7ee3e8f6 |
| hovercard-subject-tag | issue:3935887945 |
| 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/5965/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e698783d72abe51fb8d873b114a0aa036c405251234a1233dd5a7c57f8a2f1c/feast-dev/feast/issues/5965 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e698783d72abe51fb8d873b114a0aa036c405251234a1233dd5a7c57f8a2f1c/feast-dev/feast/issues/5965 |
| og:image:alt | Summary FeatureStore._materialize_odfv uses source_fv.entities (entity names) instead of source_fv.join_keys (join key column names) when building BigQuery queries. This causes materialization to f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | max36067 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width