René's URL Explorer Experiment


Title: Python SDK get_historical_features does not use field mappings. · Issue #2248 · feast-dev/feast · GitHub

Open Graph Title: Python SDK get_historical_features does not use field mappings. · Issue #2248 · feast-dev/feast

X Title: Python SDK get_historical_features does not use field mappings. · Issue #2248 · feast-dev/feast

Description: Expected Behavior When setting a field mapping for offline data sources such as {"column_name": "feature_name"}, I would expect to call get_historical_features(features=["feature_name"]) and get back a dataframe with this feature_name as...

Open Graph Description: Expected Behavior When setting a field mapping for offline data sources such as {"column_name": "feature_name"}, I would expect to call get_historical_features(features=["feature_name"]) and get ba...

X Description: Expected Behavior When setting a field mapping for offline data sources such as {"column_name": "feature_name"}, I would expect to call get_historical_features(features=["f...

Opengraph URL: https://github.com/feast-dev/feast/issues/2248

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python SDK get_historical_features does not use field mappings.","articleBody":"## Expected Behavior \r\n\r\nWhen setting a field mapping for offline data sources such as `{\"column_name\": \"feature_name\"}`, I would expect to call `get_historical_features(features=[\"feature_name\"])` and get back a dataframe with this `feature_name` as a column.\r\n\r\n## Current Behavior\r\n\r\n- File data source: works as expected.\r\n- Bigquery data source: `google.api_core.exceptions.BadRequest: 400 Unrecognized name: feature_name at [581:13]`\r\n- Redshfit data source: `Redshift SQL Query failed to finish. Details: ... 'Error': 'ERROR: column \"feature_name\" does not exist`\r\n\r\n## Steps to reproduce\r\n\r\nWithin the [fraud detection tutorial](https://docs.feast.dev/tutorials/fraud-detection), update the `fraud_features.py` to use a field mapping in the `user_transaction_count_7d` feature view:\r\n\r\n```\r\ndriver_stats_fv = FeatureView(\r\n    name=\"user_transaction_count_7d\",\r\n    entities=[\"user_id\"],\r\n    ttl=timedelta(weeks=1),\r\n    batch_source=BigQuerySource(\r\n        table_ref=f\"{PROJECT_ID}.{BIGQUERY_DATASET_NAME}.user_count_transactions_7d\",\r\n        event_timestamp_column=\"feature_timestamp\",\r\n        field_mapping={{\"transaction_count_7d\": \"transaction_count_7d_fm\"}}))\r\n```\r\n\r\nwhen calling `get_historical_features` you get an error that this column doesn't exist.\r\n\r\n```\r\ntraining_data = store.get_historical_features(\r\n    entity_df=f\"\"\"\r\n    select \r\n        src_account as user_id,\r\n        timestamp,\r\n        is_fraud\r\n    from\r\n        feast-oss.fraud_tutorial.transactions\r\n    where\r\n        timestamp between timestamp('{two_days_ago.isoformat()}') \r\n        and timestamp('{now.isoformat()}')\"\"\",\r\n    features=[\r\n        \"user_transaction_count_7d:transaction_count_7d_fm\",\r\n        \"user_account_features:credit_score\",\r\n        \"user_account_features:account_age_days\",\r\n        \"user_account_features:user_has_2fa_installed\",\r\n        \"user_has_fraudulent_transactions:user_has_fraudulent_transactions_7d\"\r\n    ],\r\n    full_feature_names=True\r\n).to_df()\r\n\r\ntraining_data.head()\r\n\r\n> BadRequest: 400 Unrecognized name: transaction_count_7d_fm; Did you mean transaction_count_7d? at [77:13]\r\n```\r\n\r\nNote, the materialize step handles the field mapping appropriately, and `get_online_features` works as expected.\r\n\r\n```\r\nfeature_vector = store.get_online_features(\r\n        features=[\r\n        \"user_transaction_count_7d:transaction_count_7d_fm\",\r\n        \"user_account_features:credit_score\",\r\n        \"user_account_features:account_age_days\",\r\n        \"user_account_features:user_has_2fa_installed\",\r\n        \"user_has_fraudulent_transactions:user_has_fraudulent_transactions_7d\"\r\n    ],\r\n        entity_rows=entity_rows\r\n    ).to_dict()\r\n\r\n> {'credit_score': [480], 'account_age_days': [655], 'user_has_2fa_installed': [1], 'transaction_count_7d_fm': [6], 'user_has_fraudulent_transactions_7d': [0.0]}\r\n```\r\n\r\n### Specifications\r\n\r\n- Version: 0.17\r\n- Platform: Any\r\n- Subsystem:\r\n\r\n## Possible Solution\r\n\r\nUpdate data sources to query from the column name and return the mapped feature name.\r\n","author":{"url":"https://github.com/michelle-rascati-sp","@type":"Person","name":"michelle-rascati-sp"},"datePublished":"2022-01-27T19:35:21Z","url":"https://github.com/feast-dev/feast/issues/2248"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bf2482a4-4d9f-27f1-ecad-ed5311e86dfd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB96E:2DC43A:117D854:17544DB:6AFEABC2
html-safe-noncea973a766858228e6e802187874d8396856eea025f271627e0b70521411a98d23
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTZFOjJEQzQzQToxMTdEODU0OjE3NTQ0REI6NkFGRUFCQzIiLCJ2aXNpdG9yX2lkIjoiMzczMTA2MjMxOTc0MDc5MTc0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac73ab326e6df8678b92573079f3ff054afe4ad7f8e6ee50ed2de59f91ed0a1742
hovercard-subject-tagissue:1116663535
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/2248/issue_layout
twitter:imagehttps://opengraph.githubassets.com/14627cd97e8cb4a9a1ee5ab34a0cf850c2985c4a341577fec160767ede6adacc/feast-dev/feast/issues/2248
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/14627cd97e8cb4a9a1ee5ab34a0cf850c2985c4a341577fec160767ede6adacc/feast-dev/feast/issues/2248
og:image:altExpected Behavior When setting a field mapping for offline data sources such as {"column_name": "feature_name"}, I would expect to call get_historical_features(features=["feature_name"]) and get ba...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemichelle-rascati-sp
hostnamegithub.com
expected-hostnamegithub.com
None95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e
turbo-cache-controlno-preview
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3f25273206cd841171bca0002261ae4c9757d934
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/2248#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F2248
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F2248
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/2248
Reloadhttps://github.com/feast-dev/feast/issues/2248
Reloadhttps://github.com/feast-dev/feast/issues/2248
feast-devhttps://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Codehttps://github.com/feast-dev/feast
Issues223 (223)https://github.com/feast-dev/feast/issues
Pull requests143 (143)https://github.com/feast-dev/feast/pulls
Discussionshttps://github.com/feast-dev/feast/discussions
Actionshttps://github.com/feast-dev/feast/actions
Security and quality1 (1)https://github.com/feast-dev/feast/security
Insightshttps://github.com/feast-dev/feast/insights
https://github.com/feast-dev/feast
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/2248
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/2248
#2252https://github.com/feast-dev/feast/pull/2252
Python SDK get_historical_features does not use field mappings.https://github.com/feast-dev/feast/issues/2248#top
#2252https://github.com/feast-dev/feast/pull/2252
https://github.com/woop
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com/michelle-rascati-sp
michelle-rascati-sphttps://github.com/michelle-rascati-sp
on Jan 27, 2022https://github.com/feast-dev/feast/issues/2248#issue-1116663535
fraud detection tutorialhttps://docs.feast.dev/tutorials/fraud-detection
michelle-rascati-sphttps://github.com/michelle-rascati-sp
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
on Jan 27, 2022https://github.com/feast-dev/feast/issues/2248#event-5966278105
github-actionshttps://github.com/apps/github-actions
woophttps://github.com/woop
on Jan 27, 2022https://github.com/feast-dev/feast/issues/2248#event-5966279461
https://github.com/michelle-rascati-sp
michelle-rascati-sphttps://github.com/michelle-rascati-sp
on Jan 27, 2022https://github.com/feast-dev/feast/issues/2248#issuecomment-1023611298
feast-ci-bothttps://github.com/feast-ci-bot
completedhttps://github.com/feast-dev/feast/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2252https://github.com/feast-dev/feast/pull/2252
on Jan 28, 2022https://github.com/feast-dev/feast/issues/2248#event-5968879939
Sign up for freehttps://github.com/signup?return_to=https://github.com/feast-dev/feast/issues/2248
Sign in to commenthttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/2248
woophttps://github.com/woop
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.