2
votes

With Google BigQuery, I'm running a query with a group by and receive the error, "resources exceeded during query execution".

Would an increased quota allow the query to run?

Any other suggestions?

SELECT
ProductId,
StoreId, 
ProductSizeId,
InventoryDate as InventoryDate,
avg(InventoryQuantity) as InventoryQuantity
FROM BigDataTest.denorm
GROUP EACH BY   
ProductSizeId,
InventoryDate,
ProductId,
StoreId;

The table is around 250GB, project # is 883604934239.

1
It seems there's a problem with GROUP EACH BY, see the other questions: stackoverflow.com/questions/16348898/… stackoverflow.com/questions/16335574/…Balazs Gunics
Yes, this seems like a bug with GROUP EACH BY. Investigating.Jordan Tigani

1 Answers

0
votes

A combination of reducing the data involved and recent updates to BigQuery, this query now runs.

where ABS(HASH(ProductId) % 4) = 0

Was used to reduce the 1.3 Billion rows in the table (% 3 still failed).

With the test data set it gives "Error: Response too large to return in big query" which can be handled by writing the results out to a table. Click Enable Options, 'Select Table' (and enter a table name), then check 'Allow Large Results'.