BigQuery的。查询多个表时出错:意外。请再试一次

时间:2013-07-26 15:18:20

标签: google-bigquery

BigQuery返回代码500:“意外。请再试一次。”

示例查询:

SELECT IF((bD >= "2013-03-18" AND bD < "2013-03-25"), "2013w12", IF((bD >= "2012-03-19" AND bD < "2012-03-26"), "2012w12", IF((bD >= "2011-03-21" AND bD < "2011-03-28"), "2011w12", ""))) AS pD_pW_T, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y_name, STRING(SUM(ac)) AS acK_ac_0 FROM tabl.dataset_2009, tabl.dataset_2007, tabl.dataset_2008, tabl.dataset_2013, tabl.dataset_2012, tabl.dataset_2011, tabl.dataset_2010 WHERE (((bD >= "2013-03-18" AND bD < "2013-03-25") OR (bD >= "2012-03-19" AND bD < "2012-03-26") OR (bD >= "2011-03-21" AND bD < "2011-03-28"))) AND (((bD < "2013-03-27"))) AND (ac <> 0) GROUP BY pD_pW_T, aRD_y, aRD_y_name

生产中的代码已经工作了几周。

减少执行查询的表的数量似乎有效。

1 个答案:

答案 0 :(得分:1)

看起来你的一个表上有一个模式不匹配:aRD_y在一个表中有一个整数,在另一个表中有boolean。如果您尝试将这些表联合在一起,则会出错。

我会在内部提交错误以改进此错误消息。谢谢你的报告!