View the original community article here
Last tested: Apr 13, 2020
We have a table in that we want to query in Athena, whose column name is one of the reserved words. How can we get around this and select the column without having the update/change the name within the database table?
As referenced in the Athena Doc, we'll see that 'group' is listed as a reserved word, which will prohibit us from querying for that table in our select statement.
As stated in the docs, we'll want to add double quotes around the reserved word when querying it in
SELECT statements. Adding double quotes around the column name to sql parameter will equate to that within Looker.
By adding the double quotes around the column name in the SQL parameter of our LookML definition, Looker encloses the quotes that around in the field name in the generated SQL which will then allow us to select our reserved word column.