teejay2xu
teejay2xu

Reputation: 11

BigQuery - unable to run select * from saved view, which runs successfully on its own

I currently have a series of views in BigQuery which "feed" into each other, much like the image attached. In the picture, the green circles represent created views, and the blue represent already created tables, which are updated daily by incoming data.

I am able to successfully run the script that makes up V8 (SELECT * FROM V6 JOIN V7 ON v6.attribute = V7.attribute, but I get a "Error: Resources exceeded during query execution." error when I run a SELECT * FROM V8. Shouldn't this be the same query? What would cause SELECT * FROM V6 JOIN V7... to succeed and SELECT * FORM V8 to fail?

Also, When running my last view (SELECT * FROM FINAL_RESULTS), I receive the same "exceeded resources" error as before, and I am guessing this is because of the error in V8.

I have already taken the steps to use JOIN EACH and GROUP EACH BY in V6, V7, V8, and the FINAL_RESULTS, but I still get the same error.

I know the multiple views seem unnecessary, but they are used for many reasons outside of what I am trying to accomplish, and since the data they reference in the tables is always being updated, they need to be dynamic.

In the picture, the green circles represent created views, and the blue represent already created tables.

Any help would be greatly appreciated!

Upvotes: 1

Views: 356

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 172993

I think you hit nested views limitation. I think it was 8

confirmed - https://cloud.google.com/bigquery/querying-data?hl=en#views
BigQuery supports up to eight levels of nested views

Upvotes: 2

Related Questions