I'm migrate from Teradata to BigQuery and I have a view that was working perfectly in Teradata but in BigQuery I have an error:
Resource exceeded during query execution: Not enough resources for query planning - too many subqueries or query is too complex.
When I just run the view query it returns 38 million rows in 60 seconds, but when I try to select from the view I get an error.
Please help me understand this error or direct me where to look for a solution, thanks!
Query structure:
Select from table
a lot of joins
union all
Select from table
a lot of joins and few unions