Understanding the "Not found: Dataset ### was not found in location US" error

Viewed 1141

I know this topic has come up many times but still here I am. Data processing location seems consistent (dataset, US; query: US) and I am using backticks & long format in the FROM clause

Below are two sequences of code. The first one works perfectly:

SELECT station_id
FROM `bigquery-public-data.austin_bikeshare.bikeshare_stations`

Whereas the following returns an error message:

SELECT bikeshare_stations.station_id
FROM `bigquery-public-data.austin_bikeshare`

Not found: Dataset glassy-droplet-347618:bigquery-public-data was not found in location US

My question, thus, is why do the first lines of text work while the second doesn't?

enter image description here

enter image description here

enter image description here

1 Answers

You need to understand the different parts of the backticks:

  1. bigquery-public-data is the name of the project;
  2. austin_bikeshare is the name of the schema (aka dataset in BQ); and
  3. bikeshare_stations is the name of the table/view.

Therefore, the shorter format you are looking for is: austin_bikeshare.bikeshare_stations (instead of bigquery-public-data.austin_bikeshare).

Using bigquery-public-data.austin_bikeshare means that you have a schema called bigquery-public-data that contains a table called austin_bikeshare , when this is not true.

Related