蜂巢tblproperties等于pyspark中的parquet文件

发布于 2025-02-09 09:06:55 字数 215 浏览 2 评论 0原文

我正在将HQL脚本转换为Pyspark。
hql代码show tblproperties tblname('transient_lastddltime')
我想要parquet文件的“ transient_lastddltime”属性。我知道使用Delta Lake API有Delta选项卡有一种方法,但是有没有办法用于木板文件?

I'm converting hql scripts to pyspark.
HQL code : show tblproperties tblName ('transient_lastDdlTime')
I want "transient_lastDdlTime" property equivalent for parquet files. I know there is a way for delta tabes using delta lake APIs, but is there a way for parquet files?

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

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

发布评论

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

评论(1

各空 2025-02-16 09:06:55

我认为Parquet文件中没有任何这样的元数据等效于Transient_lastddltime,您可以通过编写一些Parquet文件并使用以下代码读取其元数据来检查

import pyarrow.parquet as pq
pq.read_metadata('<file_path>')

相同元数据只有一些基本的行和列信息。

您将需要实施自己的代码以捕获更改的时间戳

I don't think there is any such metadata in parquet files which will be equivalent of transient_lastDdlTime you can check the same by writing some parquet files and reading its metadata using below code

import pyarrow.parquet as pq
pq.read_metadata('<file_path>')

As you see there is no external metadata created like delta tables and parquet metadata only has some basic row and column information.

you will need to implement your own code for capturing timestamp of changes

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