[英]AWS Athena Drop Table + S3 Location
I have a case where I need to drop the table and replace it using lambda functions.我有一种情况需要删除表格并使用 lambda 函数替换它。 So far my first lambda function drops the table with the following SQL Query:
到目前为止,我的第一个 lambda function 使用以下 SQL 查询删除表:
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:然后我有第二个 lambda 删除表所在的文件夹以防止“failure_reason”:“HIVE_PATH_ALREADY_EXISTS:
So the second lambda deletes the path: s3://mytablesbucket/dummytable所以第二个lambda删除路径:s3://mytablesbucket/dummytable
Is there a way of achieving this with a single lambda?有没有办法用一个 lambda 来实现这个目标?
Ofcourse Yes.当然是的。 In a single lambda function you can execute multiple statements.
在单个 lambda function 中可以执行多个语句。 I am not sure which programming language you are using in lambda. But all languages support this.
我不确定你在lambda中使用的是哪种编程语言。但是所有语言都支持这个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.