amazon-web-servicesamazon-dynamodbamazon-athena

Can AWS Athena DynamoDB Connector not able to scan DynamoDB tables with Upper Case letters in their name?


I am facing a strange behaviour when using AWS Athena DynamoDB Connector. It seems to me that the connector does not read/scan DynamoDB tables named in Upper Case letters (e.g. MY_CARS).

Hear me out here..

I have 1 test DynamoDB table called 'country' (all lower case) and I configured Athena DynamoDB connector to read and query against this table. All is good so far and I am able to query the 'country' table using Athena SQL Query.

Now I create another DynamoDB table and called it 'MY_CARS' (all upper case) and when I went back to the Athena SQL Query, I got the following error: Athena Error

Has anyone faced this issue? you can see the error message is using 'my_cars' (lower case) while my table is name is 'MY_CARS' so it is failing to get the table metadata because DynamoDB tables are case sensitive and obviously I don't have a table called 'my_cars' with lower case letters.

I feel that this is a bug in the DynamoDB Connector but I want to see if anyone faced or could confirm this behaviour (or if there is a quick fix I can use).


Solution

  • It's not the connector thats the issue, it's how Athena works:

    Acceptable characters for database names, table names, and column names in AWS Glue must be a UTF-8 string and should be in lower case. Note that Athena automatically lowers any upper case names in DDL queries when it creates databases, tables, or columns. The string must not be less than 1 or more than 255 bytes long.

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