I am trying to run a query on BigQuery, but I keep getting this error message; "Syntax error: Expected end of input but got keyword AS"
Attached below is the screenshot of the query and the error code on BigQuery. Please any help on how to resolve this would be appreciated.
Hi calm_shadow,
The problem is at the end of "warehouse.state" , remove "." and then query run fine.
Best regards.
Hi @calm_shadow,
Welcome and thank you for reaching out to our community.
As mentioned by @JAlcolea, removing the dot/ period on the last field/ column in your SELECT statement (line 4) will resolve the error.
SELECT
orders.*,
warehouse.warehouse_alias,
warehouse.state
FROM
'calm-shadow-409918.warehouse_data.orders' AS orders
JOIN
'calm-shadow-409918.warehouse_data.warehouse' AS warehouse
ON orders.warehouse_id = warehouse.warehouse_id