0

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

2
  • 2
    You can't reference legacy SQL views from standard SQL queries. Commented Jan 23, 2019 at 4:14
  • Excellent. I just tested. I got this error - Cannot reference a legacy SQL view in a standard SQL query when tried. Commented Jan 23, 2019 at 5:37

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.