BigQuery UDF works in one project but not another

时间:2016-07-11 22:43:59

标签: google-bigquery

I have been using UDF's for a few months now with a lot of success. Recently, I set up separate projects for development, and stream a sample of 1/10 of our web tracking data into these projects.

What I'm finding is that the UDF's I use in production, which operate on the full dataset, are working, while the exact same query in our development project consistently fails, despite querying 1/10 of the data. The error message is:

Query Failed

Error: Resources exceeded during query execution: UDF out of memory.

Error Location: User-defined function

I've looked through our Quotas and haven't found anything that would be limiting the development project.

Does anybody have any ideas?

If anybody can look into it, here are the project ids:

Successful query in production: bquijob_4af38ac9_155dc1160d9

Failed query in development: bquijob_536a2d2e_155dc153ed6

1 个答案:

答案 0 :(得分:0)

Jan-Karl,对迟到的回应道歉;我已经离开这个国家,在日本的某些活动中发言,然后一直在处理生产问题。

我终于有机会为你调查这个。您发给我的两个工作ID正在运行非常不同的查询。查询看起来相同,但它们实际上是在视图上运行,视图具有不同的定义。成功的查询是直接select * from table,而拥有JS OOM的查询是使用UDF。

我们正在通过允许JavaScript引擎使用更多内存来推出针对JS OOM问题的修复程序。

...

...现在提供一些与此案例无关的信息,但这可能具有未来价值......

...

理论上,即使查询在完全相同的数据集上运行,查询也可能在一个项目中成功而在另一个项目中失败。这可能是不寻常的,但可能。

背景:BigQuery在多个数据中心中运行和维护客户数据的副本以实现冗余。不同的项目偏向于在不同的数据中心运行,以帮助负载分散和利用。

如果数据足够新,则查询将在其项目的默认数据中心中运行。我们有一个在数据中心之间复制数据的过程,我们避免在具有过时数据副本的数据中心中运行。但是,我们运行维护作业以确保组成您数据的文件具有最佳的"尺寸。这些作业是按照数据中心单独安排的,因此同一个精确表格的基础数据文件可能在单元格A和单元格B中具有不同的物理结构。这可能会影响查询的各个方面。 #39;性能,在极端情况下,查询可能在单元格A中成功但不能在B中成功。