'AWS Athena MSCK REPAIR TABLE "table_name" Error adding new partitions

When trying to refresh the partitions in a AWS Athena/Glue table I am getting this error

line 1:1: mismatched input 'MSCK'. Expecting: 'ALTER', 'ANALYZE', 'CALL', 'COMMIT', 'CREATE', 'DEALLOCATE', 'DELETE', 'DESC', 'DESCRIBE', 'DROP', 'EXECUTE', 'EXPLAIN', 'GRANT', 'INSERT', 'PREPARE', 'RESET', 'REVOKE', 'ROLLBACK', 'SET', 'SHOW', 'START', 'UNLOAD', 'UPDATE', 'USE',

the command I execute is

MSCK REPAIR TABLE "table_name"

It was working a week ago. I believe there was an update but I cannot find the new/proper way to add new partitions



Solution 1:[1]

In my case, the table was attached to a Glue Crawler... So it was just to run the Crawler again!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Monica Ramirez