使用导出数据调度从Google BigQuery提取的数据 [英] Scheduling data extract from Google BigQuery using export data

查看:66
本文介绍了使用导出数据调度从Google BigQuery提取的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用查询调度程序来调度Google bigquery中的每月数据导出.这是我的查询显示atm的方式:

I am trying to schedule monthly data exports in Google bigquery using query scheduler. This is how my query looks atm:

export data options(
uri='gs://bucket_name/Test*.csv',
format='CSV',
header=true,
overwrite=true,
field_delimiter=';') as
select id from `project.database.table`;

这在我运行查询时非常有效,但是在将其另存为计划查询时会失败(错误:无法在具有EXPORT语句的作业中设置目标表)

This works perfectly when I run the query but fails when I save this as a scheduled query (Error: Cannot set destination table in jobs with EXPORT statement)

如果不指定结果表,则无法使用调度程序.有办法解决这个限制吗?

I cannot use the scheduler without specifying a result table. Is there a way to get around this limitation?

推荐答案

这听起来像是一个错误,BigQuery要求为EXPORT DATA查询设置目标表.请等待修复时尝试以下解决方法:

This sounds like a bug that BigQuery is requiring setting up a destination table for EXPORT DATA query. Please try this workaround while waiting for a fix:

-- Add this line for your query to be treated as a script
declare unused STRING;

export data options(
...

这篇关于使用导出数据调度从Google BigQuery提取的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆