0
votes

Say there is a table A that is a time-partitioned table. To reduce cost of queries, my organization created a view of B, which queries only last 3 days of data. This view B is described in legacy SQL. Next month, new applications will be connecting to BigQuery to read the B data via an ODBC connection? Below are couple of options of which, which could be the best option?

A - Creating a new view C over view B using standard SQL

B - Creating a new view over table A using standard SQL

1
You can't reference legacy SQL views from standard SQL queries. - Elliott Brossard
Excellent. I just tested. I got this error - Cannot reference a legacy SQL view in a standard SQL query when tried. - Roshan Fernando

1 Answers

2
votes

B is the better option:

  • B - Creating a new view over table A using standard SQL

This because you can't call a #legacySQL view from a query using #standardSQL. So the best road will be to create a similar view, but this time with #standardSQL.