Skip to content

Athena tables gets missing on its own

0

I have to create athena table using spark sql, like below:

spark.sql(f""" CREATE TABLE dbname.tablename using PARQUET options(path 's3_full_path') """)

The table is getting created, but after around 10 mins it get missing

asked 3 years ago519 views
1 Answer
0

I would suggest to create the table using EXTERNAL keyword as per the suggested standard-

Except when creating Iceberg tables, always use the EXTERNAL keyword. If you use CREATE TABLE without the EXTERNAL keyword for non-Iceberg tables, Athena issues an error. When you drop a table in Athena, only the table metadata is removed; the data remains in Amazon S3.

Ref- https://docs.aws.amazon.com/athena/latest/ug/creating-tables.html

https://docs.aws.amazon.com/athena/latest/ug/parquet-serde.html

AWS
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.