AWS雅典娜 - 使用SQL更新表行

发布于 2025-01-18 08:59:13 字数 149 浏览 2 评论 0原文

我是AWS生态系统的新手。我正在创建一个使用AWS Athena查询数据的应用程序。使用AWS胶将数据从JSON转换为Parquet,并存储在S3中。

现在,用例是使用SQL更新该焦木数据。

我们可以使用AWS ATHENA SQL命令更新基础镶木木材吗?

I am newbie to AWS ecosystem. I am creating an application which queries data using AWS Athena. Data is transformed from JSON into parquet using AWS Glue and stored in S3.

Now use case is to update that parquet data using SQL.

can we update underlying parquet data using AWS Athena SQL command?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

披肩女神 2025-01-25 08:59:13

不可以,无法在 Amazon Athena 中使用 UPDATE

Amazon Athena 是一个查询引擎,而不是数据库。它对存储在 Amazon S3 中的数据执行查询。它读取这些文件,但修改或更新这些文件。因此,它无法“更新”表。

最接近的功能是使用CREATE TABLE AS来创建表。您可以提供一个使用其他表中的数据的 SELECT 查询,这样您就可以有效地修改信息并将其存储在新表中,并告诉它对该新表使用 Parquet。事实上,这是将数据从其他格式转换为 Snappy 压缩的 Parquet 文件的绝佳方法(如果您愿意,可以进行分区)。

No, it is not possible to use UPDATE in Amazon Athena.

Amazon Athena is a query engine, not a database. It performs queries on data that is stored in Amazon S3. It reads those files, but it does not modify or update those files. Therefore, it cannot 'update' a table.

The closest capability is using CREATE TABLE AS to create a new table. You can provide a SELECT query that uses data from other tables, so you could effectively modify information and store it in a new table, and tell it to use Parquet for that new table. In fact, this is an excellent way to convert data from other formats into Snappy-compressed Parquet files (with partitioning, if you wish).

爱本泡沫多脆弱 2025-01-25 08:59:13

根据数据在 Athena 中的存储方式,您可以使用 SQL UPDATE 状态更新它。请参阅更新 Iceberg 表数据使用受管表

Depending on how data is stored in Athena, you can update it using SQL UPDATE statmements. See Updating Iceberg table data and Using governed tables.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文