pyspark-将所有文件拉到基于filemask的数据框中

发布于 2025-02-11 06:28:23 字数 333 浏览 0 评论 0原文

这是我前往Python的第一天(第0天是正确的PITA)。

我正在使用Azure Databricks(Python/Pyspark)和ADLS Gen2存储容器。

在我的容器中,我具有以下分区结构。这是数据存储的ADF管道。

档案/[年]/[noter]/[day]/[time]/[大约150个文件] .parquet(counce.parquet,customer.parquet,sales.parquet等)

我想实现的目标就是能够做是穿越容器,例如FileMask包含“帐户”发送到帐户的任何文件。

这将使我能够将数据框架与突触池中的数据进行比较,以确保数据中没有差距。

This is day 1 of my journey into python (day 0 was a right pita).

I have am using Azure DataBricks (Python/Pyspark) and ADLS Gen2 Storage container.

Within my container I have the below partition structure. Which is data stored post ADF Pipeline.

ARCHIVE/[YEAR]/[Month]/[Day]/[Time]/[approx 150 files].parquet (account.parquet, customer.parquet, sales.parquet etc)

What I would like to achieve is to be able to do is to traverse the container and for example any files where the filemask contains "account" send to the accountdf.

This would allow me to be able to compare the data frame with the data in the synapse pool to ensure there are no gaps within the data.

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

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

发布评论

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

评论(1

各自安好 2025-02-18 06:28:23

如果所有帐户,客户,销售额都在一个日期时间分区下,则可以使用

accountdf = spark.read.parquet(“ wasbs://< container-name>@< storege-acccount-name>。 blob.core.windows.net/accountj.parquet”)

If all account, customer, sales are under one date time partition, then you can use

accountdf = spark.read.parquet("wasbs://<container-name>@<storage-account-name>.blob.core.windows.net/account*.parquet")

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