awswrangler.catalog.sanitize_table_name

awswrangler.catalog.sanitize_table_name(table: str) str

Convert the table name to be compatible with Amazon Athena.

https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html

Possible transformations: - Strip accents - Remove non alphanumeric characters - Convert CamelCase to snake_case

Parameters

table (str) – Table name.

Returns

Normalized table name.

Return type

str

Examples

>>> import awswrangler as wr
>>> wr.catalog.sanitize_table_name('MyNewTable')
'my_new_table'