When running the following query I got the error:
Resources exceeded during query execution: The query could not be executed in the allotted memory. Peak usage: 158% of limit. Top memory consumer(s): sort operations used for analytic OVER() clauses: 98% other/unattributed: 2%
select *, row_number() over(PARTITION BY Column_A ORDER BY Column_B)
from
(SELECT
*
FROM
Table_1 UNION ALL
SELECT
*
FROM
Table_2 UNION ALL
SELECT
*
FROM
Table_3
)
Can someone help me how to change this query or is there possibility that we can change the memory limit in bigquery?