we have layers of nested views, that I do not have control over as they are developed by other teams. Clients policy is not persist any data unless it is absolutely must.
I read somewhere that Big Query calculates "complexity" using multiple factors ( number of views, table UDF, nested views, number of columns ) and throw this error when the complexity number exceeds certain value.
I removed all CTE's and changed them to sub queries, reduces some columns, and running out of options.
At this point I am trying to find out how to find the BQ complexity number for my query, is there a quota that governess that number. any help is apriciated
I faced similar issue and here's what I did to triage and was successful with it - hopefully this gives some pointers and helps you with it.
Thank you. I have solved the problem multiple times as you suggested by removing joins when possible, but we are now reaching the limit what can be done.
I would prefer not to do trial and error, and like to get confirmation on how this complexity is calculated and if there is a way to see that complexity number.