Reputation: 432
Guys I imported a table from .csv to my dataset in a project. Then I preview my table it's shown, but whenever I ran query table, it always responded with
Query Failed
Error: Not found: Dataset <project-id>:<table-name>. Please verify that the dataset exists and the correct location was used for the job.
Here's my query
SELECT distinct(customer_id) as cust_id FROM [<project-id>:<table-name>.orders] LIMIT 1000
Is there anything wrong? Or how should I query an imported table?
Upvotes: 1
Views: 13661
Reputation: 8178
From your question, I see that you are using as table name <project-id>:<table-name>
, but as you can see in this documentation page, the correct naming for project-qualified table definitions is the following:
#legacySQL
[PROJECT_ID:DATASET.TABLE]
#standardSQL
`PROJECT_ID.DATASET.TABLE`
I see you are using Legacy SQL (by the usage of square brackets [ ]
), so you should go with the first naming definition, but you are missing the dataset name between the project and the table.
Additionally, I see you are appending orders
to the table name, but it is not clear what that is, given that you hid the table name as <table-name>
.
Additionally, make sure that, if your dataset is not located in the US or EU, you specify the location when running the query, as explained in this entry in the documentation.
Upvotes: 5