【发布时间】:2017-05-23 14:02:24
【问题描述】:
有时在 Google BigQuery 中使用 TABLE_DATE_RANGE 的查询会失败。
但是目标表已经存在,并且失败的查询通过重试成功。
具体例子如下。
---------------------------------------
The Target Table
---------------------------------------
[ Dataset ID ] my_dataset
[ Table ID ] my_table_20170519
[ Creation Time ] 2017-05-20 02:00:52
---------------------------------------
The Executed Query
---------------------------------------
SELECT
column1, column2, .....
FROM
TABLE_DATE_RANGE(
my_dataset.my_table_,
TIMESTAMP('20170519'),
TIMESTAMP('20170519')
)
;
---------------------------------------
The 1st Execution and Result
---------------------------------------
[ Job Start Time ] 2017-05-20 02:00:57.513
[ Job End Time ] 2017-05-20 02:00:57.513
[ Result ] Failure by "FROM clause with table wildcards matches no table"
---------------------------------------
The 2nd Execution and Result (Retry)
---------------------------------------
[ Job Start Time ] 2017-05-20 02:04:56.556
[ Job End Time ] 2017-05-20 02:04:56.556
[ Result ] Failure by "FROM clause with table wildcards matches no table"
---------------------------------------
The 3rd Execution and Result (Retry)
---------------------------------------
[ Job Start Time ] 2017-05-20 02:06:43.937
[ Job End Time ] 2017-05-20 02:06:46.291
[ Result ] Success
-
顺便说一句,使用 NO TABLE_DATE_RANGE 的查询总是会成功。
(例如FROM [my_dataset.my_table_20170519])。
使用相同的 FROM 子句几乎同时执行的其他查询有时会成功。
当然,使用重试可以解决上面的例子。
但我担心 my_table_20170519 会被使用以下 FROM 子句的查询忽略。
FROM
TABLE_DATE_RANGE(
my_dataset.my_table_,
TIMESTAMP('20170510'),
TIMESTAMP('20170519')
)
有没有人有办法解决它?
我添加两个关于这个问题的例子。
示例 A:
使用相同的 FROM 子句几乎同时执行的其他查询有时会成功。
----------------------------------------------
The Detail of Case
----------------------------------------------
- A program executes query "A" and query "B" in BigQuery.
- Both queries have the following FROM clause。
FROM TABLE_DATE_RANGE(
my_dataset.my_table_,
TIMESTAMP('20170519'),
TIMESTAMP('20170519')
)
----------------------------------------------
The 1st Execution and Result
----------------------------------------------
Query "A"
[ Job Start Time ] 2017-05-20 02:00:57.513
[ Job End Time ] 2017-05-20 02:00:57.513
[ Result ] Failure by "FROM clause with table wildcards matches no table"
Query "B"
[ Job Start Time ] 2017-05-20 02:00:57.507
[ Job End Time ] 2017-05-20 02:01:09.537
[ Result ] Success
----------------------------------------------
The 2nd Execution and Result (Retry)
----------------------------------------------
Query "A"
[ Job Start Time ] 2017-05-20 02:04:56.556
[ Job End Time ] 2017-05-20 02:04:56.556
[ Result ] Failure by "FROM clause with table wildcards matches no table"
# Query "B" is NOT executed because it already succeeded.
----------------------------------------------
The 3rd Execution and Result (Retry)
----------------------------------------------
Query "A"
[ Job Start Time ] 2017-05-20 02:06:43.937
[ Job End Time ] 2017-05-20 02:06:46.291
[ Result ] Success
# Query "B" is NOT executed because it already succeeded.
示例 B:
此问题有时会在“不小的”时间段后发生。
---------------------------------------
The Target Table
---------------------------------------
[ Dataset ID ] my_dataset
[ Table ID ] my_table_b_20170519
[ Creation Time ] 2017-05-20 01:42:22
---------------------------------------
The Executed Query
---------------------------------------
SELECT
column1, column2, .....
FROM
TABLE_DATE_RANGE(
my_dataset.my_table_b_,
TIMESTAMP('20170519'),
TIMESTAMP('20170519')
)
;
----------------------------------------------
The 1st Execution and Result
----------------------------------------------
[ Job Start Time ] 2017-05-20 01:59:51.255
[ Job End Time ] 2017-05-20 01:59:51.255
[ Result ] Failure by "FROM clause with table wildcards matches no table"
----------------------------------------------
The 2nd Execution and Result
----------------------------------------------
[ Job Start Time ] 2017-05-20 02:04:53.802
[ Job End Time ] 2017-05-20 02:04:57.684
[ Result ] Success
【问题讨论】:
标签: google-bigquery