Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

BigQuery Error Message

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.

Screenshot 2024-01-29 123944.png

2 2 421
2 REPLIES 2

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