Google BigQuery错误:查询执行期间超出资源 [英] Google BigQuery Error: Resources exceeded during query execution

查看:229
本文介绍了Google BigQuery错误:查询执行期间超出资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在BigQuery中运行以下简单查询时,出现资源超出错误,此错误的大部分答案都引用了EACH子句,但我没有在查询中使用任何此类子句。

I get a "resources exceeded" error when I run the following simple query in BigQuery, most of the answers to this error refer to the EACH clause , but I am not using any such clause in my query.

SELECT
  XXX_lnaourj_ID,
  XXX_DR_Tma_LC,
  XXX_CR_Tma_LC,
  XXX_Amount_LC,
  XXX_TLAffect_LC,
  XXX_Entry_Desc,
  XXX_DocType,
  XXX_TCode,
  XXX_Company,
  XXX_Posted_By,
  XXX_Parked_By,
  XXX_Accounting_Date,
  XXX_Creation_Date
FROM
  [acl_data.XXX_JE_All_Formatted]
WHERE
  XXX_lnaourj_ID IN (
  SELECT
    XXX_lnaourj_ID
  FROM
    [acl_data.XXX_JE_All_Formatted]
  WHERE
    XXX_Creation_Date - XXX_Accounting_Date > 30 )
ORDER BY
  XXX_lnaourj_ID ASC;


推荐答案

删除ORDER BY,它应该可以工作

Remove ORDER BY and it should work

我认为BigQuery引擎使用JOIN翻译你的查询(这就是为什么你看到它被引用),所以你的另一个选择是重写你的查询显式使用JOIN并尝试使用和/或没有EACH条款

I think BigQuery engine translates your query using JOIN (and that's why you see it is referenced), so another option for you would be to rewrite your query using JOIN explicitly and try it with and/or without EACH clause

请参阅 https://stackoverflow.com/a / 24191584/5221944 了解更多来自bigquery团队成员的详情

see https://stackoverflow.com/a/24191584/5221944 for more details from bigquery teammember


编辑

我还没意识到它是同一张桌子!为什么不使用下面的东西?

I haven't realized it is the same table! Why not to use something like below?

SELECT
  XXX_lnaourj_ID,
  XXX_DR_Tma_LC,
  XXX_CR_Tma_LC,
  XXX_Amount_LC,
  XXX_TLAffect_LC,
  XXX_Entry_Desc,
  XXX_DocType,
  XXX_TCode,
  XXX_Company,
  XXX_Posted_By,
  XXX_Parked_By,
  XXX_Accounting_Date,
  XXX_Creation_Date
FROM [acl_data.XXX_JE_All_Formatted]
WHERE XXX_Creation_Date - XXX_Accounting_Date > 30

这篇关于Google BigQuery错误:查询执行期间超出资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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