gpt4 book ai didi

delta-lake - 如何更新 Delta 中分区列的值?

转载 作者:行者123 更新时间:2023-12-04 04:19:44 29 4
gpt4 key购买 nike

我想知道,是否可以更新增量表分区列的“值”?

该表按特定列分区,现在我想更新该特定列的值。我可以这样做吗?


(在 slack 上找到)

最佳答案

使用 replaceWhere 选项。

引用官方文档 Replace table schema :

By default, overwriting the data in a table does not overwrite the schema. When overwriting a table using mode("overwrite") without replaceWhere, you may still want to overwrite the schema of the data being written. You replace the schema and partitioning of the table by setting the overwriteSchema option to true.

引用文章Selectively updating Delta partitions with replaceWhere :

Delta makes it easy to update certain disk partitions with the replaceWhere option.

replaceWhere is particularly useful when you have to run a computationally expensive algorithm, but only on certain partitions.

关于delta-lake - 如何更新 Delta 中分区列的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59641945/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com