er0
er0

Reputation: 1834

BigQuery scheduled query failing

I have a BigQuery scheduled query that is failing with the following error:

Not found: Dataset bunny25256:dataset1 was not found in location US at [5:15]; JobID: 431285762868:scheduled_query_635d3a29-0000-22f2-888e-14223bc47b46

I scheduled the query via the SQL Workspace. When I run the query in the workspace, it works fine. The dataset and everything else that I have created is in the same region: us-central1.

Any ideas on what the problem could be, and how I could fix it or work around it?

There's nothing special about the query, it computes some statistics on a table in dataset1 and puts it in dataset2.

Upvotes: 0

Views: 602

Answers (3)

Rob Presto
Rob Presto

Reputation: 16

One note also you can not change the location on a saved scheduled query it will not fix the issue. you have to create a new scheduled query and save first time to the correct location.

Upvotes: 0

Kolban
Kolban

Reputation: 15246

When you submit a query, you submit it to BQ at a given location. The dataset you created lives in us-central1 but your query was submitted to us. The location us and us-central1 are not the same. Change your scheduled query to run in us-central1. See docs on location for more info.

Upvotes: 2

Adi_007
Adi_007

Reputation: 1

Dataset is not provided correctly- it should be in formate project.dataset.table

try running below in big query

select * from bunny25256:dataset1

you should provide bunny25256:dataset1.table

Upvotes: 0

Related Questions