sxp
sxp

Reputation: 253

Update table in Athena

I have a table in Athena created from S3. I wanted to update the column values using the update table command. Is the UPDATE Table command not supported in Athena?

Is there any other way to update the table ?

Thanks

Upvotes: 1

Views: 3420

Answers (2)

Mohan Bagavathi
Mohan Bagavathi

Reputation: 11

Now UPDATES in Athena are possible, if you have created an iceberg table in Athena.

It supports both updates and deletes.

AWS has started supporting Apache Iceberg table type in Athena from late 2023, which provides a great support for developers and engineers to play around.

https://medium.com/@mohansoftprof/aws-athena-with-update-functionality-fb3f2c922aa0

Upvotes: 0

AswinRajaram
AswinRajaram

Reputation: 1622

Athena only supports External Tables, which are tables created on top of some data on S3. Since the S3 objects are immutable, there is no concept of UPDATE in Athena. What you can do is create a new table using CTAS or a view with the operation performed there, or maybe use Python to read the data from S3, then manipulate it and overwrite it.

Upvotes: 4

Related Questions