Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Not found: Dataset my-project-name:domain_public was not found in location US

I need to make a query for a dataset provided by a public project. I created my own project and added their dataset to my project. There is a table named: domain_public. When I make query to this table I get this error:

 Query Failed
Error: Not found: Dataset my-project-name:domain_public was not found in location US
Job ID: my-project-name:US.bquijob_xxxx

I am from non-US country. What is the issue and how to fix it please?

EDIT 1: I change the processing location to asia-northeast1 (I am based in Singapore) but the same error:

Error: Not found: Dataset censys-my-projectname:domain_public was not found in location asia-northeast1 

Here is a view of my project and the public project censys-io:

enter image description here

Please advise.

EDIT 2: The query I used to type is based on censys tutorial is:

#standardsql
SELECT domain, alexa_rank
FROM domain_public.current
WHERE p443.https.tls.cipher_suite = 'some_cipher_suite_goes_here';

When I changed the FROM clause to:

FROM `censys-io.domain_public.current`

And the last line to:

WHERE p443.https.tls.cipher_suite.name = 'some_cipher_suite_goes_here';

It worked. Shall I understand that I should always include the projectname.dataset.table (if I'm using the correct terms) and point the typo the Censys? Or is this special case to this project for some reason?

like image 878
user9371654 Avatar asked Jul 18 '18 06:07

user9371654


People also ask

How do I change the dataset location in BigQuery?

After you create the dataset, the location cannot be changed, but you can copy the dataset to a different location, or manually move (recreate) the dataset in a different location. BigQuery processes queries in the same location as the dataset that contains the tables you're querying.

What is a dataset in BigQuery?

A dataset is contained within a specific project. Datasets are top-level containers that are used to organize and control access to your tables and views. A table or view must belong to a dataset, so you need to create at least one dataset before loading data into BigQuery.

What is BigQuery sandbox?

The BigQuery sandbox lets you explore BigQuery capabilities at no cost to confirm whether BigQuery fits your needs. The sandbox lets you experience BigQuery and the Google Cloud console without providing a credit card, creating a billing account, or enabling billing for your project.


3 Answers

BigQuery can't find your data

How to fix it

Make sure your FROM location contains 3 parts

  1. A project (e.g. bigquery-public-data)
  2. A database (e.g. hacker_news)
  3. A table (e.g. stories)

Like so

`bigquery-public-data.hacker_news.stories`

*note the backticks

Examples

Wrong

SELECT *
FROM `stories`

Wrong

SELECT *
FROM `hacker_news.stories` 

Correct

SELECT *
FROM `bigquery-public-data.hacker_news.stories` 
like image 84
stevec Avatar answered Oct 08 '22 19:10

stevec


In Web UI - click Show Options button and than select your location for "Processing Location"!

Specify the location in which the query will execute. Queries that run in a specific location may only reference data in that location. For data in US/EU, you may choose Unspecified to run the query in the location where the data resides. For data in other locations, you must specify the query location explicitly.


Update

As it stated above - Queries that run in a specific location may only reference data in that location

Assuming that censys-io.domain_public dataset has its data in US - you need to specify US for Processing Location

like image 10
Mikhail Berlyant Avatar answered Oct 08 '22 20:10

Mikhail Berlyant


The problem turned out to be due to wrong table name in the FROM clause. The right FROM clause should be:

FROM `censys-io.domain_public.current`

While I was typing:

FROM domain_public.current

So the project name is required in the FROM and `` are required because of - in the project name.

like image 3
user9371654 Avatar answered Oct 08 '22 19:10

user9371654