Vertex Workbench-如何在Jupyter笔记本中运行BigQueryExamplegen
问题
试图运行
InvalidUserInputError: Request missing required parameter projectId [while running 'InputToRecord/QueryTable/ReadFromBigQuery/Read/SDFBoundedSourceReader/ParDo(SDFBoundedSourceDoFn)/SplitAndSizeRestriction']
”
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "path_to_credential_file"
from tfx.v1.extensions.google_cloud_big_query import BigQueryExampleGen
from tfx.v1.components import (
StatisticsGen,
SchemaGen,
)
from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext
%load_ext tfx.orchestration.experimental.interactive.notebook_extensions.skip
context = InteractiveContext(pipeline_root='./data/artifacts')
运行BigQueryExample。
query = """
SELECT
* EXCEPT (trip_start_timestamp, ML_use)
FROM
{PROJECT_ID}.public_dataset.chicago_taxitrips_prep
""".format(PROJECT_ID=PROJECT_ID)
example_gen = context.run(
BigQueryExampleGen(query=query)
)
有错误。
InvalidUserInputError: Request missing required parameter projectId [while running 'InputToRecord/QueryTable/ReadFromBigQuery/Read/SDFBoundedSourceReader/ParDo(SDFBoundedSourceDoFn)/SplitAndSizeRestriction']
数据
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在GCP中运行的项目ID
需要通过
beam_pipeline_args
参数提供项目ID。,但它仍然会因其他错误而失败。
GCS存储桶
它在GCP中,交互式上下文通过数据流运行BigQueryExampleGen,因此需要通过
beam_pipeline_args
参数来提供GCS存储桶URL。documentation
Project ID
To run in GCP, need to provide the project ID via
beam_pipeline_args
argument.However, it still fails with another error.
GCS Bucket
It looks inside GCP, the interactive context runs the BigQueryExampleGen via Dataflow, hence need to provide a GCS bucket URL via the
beam_pipeline_args
argument.Documentation