I have a case where I need to drop the table and replace it using lambda functions. So far my first lambda function drops the table with the following SQL Query:
DROP TABLE IF EXISTS [dummytable]
I then have a second lambda that deletes the folder where the table existed to prevent "failure_reason": "HIVE_PATH_ALREADY_EXISTS:
So the second lambda deletes the path: s3://mytablesbucket/dummytable
Is there a way of achieving this with a single lambda?