跳至內容

Can we rollback the version of table in AWS glue?

0

We have created a table in athena and we are updating the schema of the table accordingly the versions are being created of that table in AWS Glue so can we roll down that version in glue and same version schema should be reflected in the AWS Athena.

已提問 2 年前檢視次數 2412 次
2 個答案
0

That is not a common use case unless there was a mistake, normally you evolve the table as you evolve the data so you would need to also rollback the data.
You can delete the version you want to rollback using the CLI or the APIs: https://docs.aws.amazon.com/cli/latest/reference/glue/delete-table-version.html

AWS
專家
已回答 2 年前
專家
已審閱 2 年前
0

It is not possible to "rollback" to a previous version per se and also you cannot delete the latest version of the table (neither on the console nor via API/CLI) so the only option is to publish a new schema version that is identical to the one you want to restore back to.

The easiest way to do this from is from the console by navigating to the table and version you want to restore and then click on "Edit Schema as JSON" the editor will be populated with the JSON of that version and then just click on "Save as new table version" which will create a new version with the same format which actually restores your table schema to the desired state.

Enter image description here

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。