BigQuery: Intrigued by the error message

BigQuery has a very intriguing error message today. I requested a table with the user.yob field (as in the year of birth). When I wrote my request, I'm a little messy, projecting onto the nonexistent field "user.age" instead of user.yob :

 SELECT user.age, ... 

This caused the following error message:

 BigQuery error in mk operation: Field 'user.age' not found; did you mean 'user.yob'? 

Now I am very curious ..

How did BigQuery manage to offer the exact field I intended to design on?

By the way, in the table I requested, there are many fields (at least 50), so user.yob not like. This is the only available field.

+7
google-bigquery
source share
1 answer

BigQuery knows about all the fields in your table and performs a variation of the Levenstein distance algorithm to find those that are closest to the names that were not found. If the distance is close enough, it is likely that the field name was simply spelled incorrectly.

+8
source share

All Articles