I am trying to save a view using BigQuery's WebUI, which was created in Standard SQL Dialect, but I am getting this error:
Failed to save view. Bad table reference "myDataset.myTable"; table references in standard SQL views require explicit project IDs
Why is this error showing up? How can I fix it? Should the "Table ID" field of the "Save view" dialog include the project id? Or does this error appear because of the query itself? Just in case, the query is running without any problems.
Thanks for your help.
BigQuery Create View Setup: Using the BigQuery ConsoleWhile choosing the “Project Name”, select a project to store the view. In “Dataset Name”, select a dataset to store the view. Finally, for “Table Name”, mention the name of the view. Click on “Save”.
BigQuery supports the Google Standard SQL dialect, but a legacy SQL dialect is also available. If you are new to BigQuery, you should use Google Standard SQL as it supports the broadest range of functionality. For example, features such as DDL and DML statements are only supported using Google Standard SQL.
Open the BigQuery page in the Google Cloud console. In the Explorer panel, expand your project and dataset, then select the table. In the details panel, click Export and select Export to Cloud Storage.
Your view has reference to myDataset.myTable
- which is ok when you just run it as a query (for example in Web UI).
But to save it as a view you must fully qualify that reference as below
myProject.myDataset.myTable
So, just add project to that reference
Same reply, in other words
The issue is in this part of query: FROM com.table
When running query, it's fine to not fully specify the name of table like this:
com_company_app_beta_IOS.app_events_20180619
But to save the query as a view the FROM has to be like this:
`company-prod`.com_company_app_beta_IOS.app_events_20180619
You need the backticks around the `company-prod`
because the -
dash character is unsupported in object names.
The structure in BigQuery look like this: bigquery ui
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With