odata_query.sql.athena module
- class odata_query.sql.athena.AstToAthenaSqlVisitor(table_alias: Optional[str] = None)[source]
Bases:
AstToSqlVisitorNodeVisitorthat transforms an AST into an Athena SQLWHEREclause.- Parameters:
table_alias – Optional alias for the root table.
- odata_query.sql.athena.clean_athena_identifier(identifier: str) str[source]
Cleans an Athena identifier so it passes the following validation rules:
Table names and table column names in Athena must be lowercase
Athena table, view, database, and column names allow only underscore special characters
Names should be quoted or backticked when starting with a number or underscore
Source: https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html