fetch_historical_feature_values: unquoted BigQuery table name fails for project IDs like my-proj-5bb0

未关闭 适合新手
#7,280 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@vanshhh18 已经在做这个了。

开始于 2026年11月10日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python

调研方向

阅读 vertexai/resources/preview/feature_store/offline_store.py,并检查构建源查询的 _feature_to_data_source。查找附近覆盖历史特征查询和表引用的测试;使用包含连字符后跟数字的 BigQuery 项目 ID 重现问题。生成的查询为完全限定表名加上引号,且 point-in-time 查询成功执行时,即为完成。

由索引模型根据 Issue 内容生成。

描述

api: vertex-ai
Environment
  • google-cloud-aiplatform 1.165.1 and 2.7.0
  • vertexai.resources.preview.feature_store.offline_store.fetch_historical_feature_values
Problem

_feature_to_data_source in vertexai/resources/preview/feature_store/offline_store.py builds the feature source query as

f"FROM {fully_qualified_table}"

without backticks. BigQuery cannot parse an unquoted project ID whose segment after a dash starts with a digit, such as my-proj-5bb0, so the point-in-time query fails:

google.api_core.exceptions.BadRequest: 400 Syntax error: Expected ")" but got "bb0"
Steps to reproduce
  1. In a project whose ID has a dash followed by a digit-leading segment (for example my-proj-5bb0), create a FeatureGroup over bq://my-proj-5bb0.dataset.view and register features.
  2. Call offline_store.fetch_historical_feature_values(entity_df=..., features=[...]).
Expected

The query quotes the table reference:

f"FROM `{fully_qualified_table}`"

With that change the query runs and returns the expected point-in-time rows.

Workaround

Call with dry_run=True, add backticks around the table name in the printed query, and run it with bigframes.pandas.read_gbq_query.

主要语言
Python
星标
914
派生
475
平均合并
2 天 6 小时
30 天内合并 PR
38

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

googleapis/python-aiplatform 的其他 Issue

查看 googleapis/python-aiplatform 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。