Dataset was not found in location US error in BigQuery

Problem 🔍

Bigquery has three part resource hierarchy, the Project Name, Dataset Name and Table table. If you did not specify the fully qualified object name which includes the project, Bigquery will throw this error.

SELECT * FROM Dataset.Big_Data_Test_1_Sales a;
Error "Dataset was not found in location US"

Solution 💡

To solve this error simply add your project Id before the dataset, so that BigQuery can locate it. Here's an example:

SELECT * FROM ProjectId.Dataset.Big_Data_Test_1_Sales a;

Best Practices ⚡

  • Always use a fully qualified name for all your objects. It not only removes ambiguity but also improves readability and maintenance

DataFreak

posted on 06 Mar 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds