Question

I know this is an older issue with Google BigQuery, but it seems the problem had been fixed @ mid 2013. I wanted to know if there has been any recent workarounds/fixes to this issue in the recent months. Here is my query from the google sample data.

SELECT publicdata:samples.natality.mother_age, publicdata:samples.gsod.station_number
FROM [publicdata:samples.natality]
INNER JOIN [publicdata:samples.gsod]
ON publicdata:samples.gsod.year = publicdata:samples.natality.year
LIMIT 100

Query Failed
Error: Unexpected. Please try again.

Job ID: deft-grammar-553:job_eUkW4EhgNvlJPuWPoP1bLL7Ra_w

Was it helpful?

Solution

Thanks for the report! That error message should be improved.

In the meantime: The same query using table aliases works well (though I had to change the JOIN to JOIN EACH to deal with the size of both tables).

Instead of:

SELECT publicdata:samples.natality.mother_age, publicdata:samples.gsod.station_number
FROM [publicdata:samples.natality]
INNER JOIN [publicdata:samples.gsod]
ON publicdata:samples.gsod.year = publicdata:samples.natality.year
LIMIT 100

Do:

SELECT a.mother_age, b.station_number
FROM [publicdata:samples.natality] a 
INNER JOIN EACH [publicdata:samples.gsod] b
ON a.year = b.year
LIMIT 100
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top