BigQuery name Unrecognized name: `sql-learning-349116.employee_data.departments`; Did you mean sql-learning-349116.employee_data.employees? at [4:3]

Viewed 13

I am pretty new to BigQuery and I have run into an issue with an example in my training pack but I cannot figure out the issue. I uploaded two tables into a project, they both uploaded without issue. I am trying to learn the join commmand, but for some reason when I put one of the tables in the select section, I get this error: "Unrecognized name: sql-learning-349116.employee_data.departments; Did you mean sql-learning-349116.employee_data.employees? at [4:3]"

I have tried with two different versions of the query, and neither seems to work.

This is the query pulled from the example that doesnt work itself.

SELECT

employees.name AS employee_name,

employees.role AS employee_role,

departments.name AS department_name

FROM

sql-learning-349116.employee_data.employees

INNER JOIN

employee_data.departments ON

employee.department_id = departments.department_id

I did some research and went ahead and put the entire path as follows. But while the employees table doesnt bring up an error, the Departments table does.

SELECT

sql-learning-349116.employee_data.employees.name AS employee_name,

sql-learning-349116.employee_data.employees.role AS employee_role,

sql-learning-349116.employee_data.departments.name AS department_name

FROM

sql-learning-349116.employee_data.employees

INNER JOIN

employee_data.departments ON

sql-learning-349116.employee_data.employees.department_id = departments.department_id

If I remove the " sql-learning-349116.employee_data.departments.name AS department_name" line, the query says it will run with no problems.

I have both tables under the right dataset and project. I am at a total loss here and being pretty much brand new doesn't make it easier.

0 Answers
Related