pyspark-将所有文件拉到基于filemask的数据框中
这是我前往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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果所有帐户,客户,销售额都在一个日期时间分区下,则可以使用
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")