當我這樣做:火花 「基本路徑」 選項設置
allf = spark.read.parquet("gs://bucket/folder/*")
我得到:
java.lang.AssertionError: assertion failed: Conflicting directory structures detected. Suspicious paths:
...和路徑列表後,下面的消息:
If provided paths are partition directories, please set "basePath" in the options of the data source to specify the root directory of the table. If there are multiple root directories, please load them separately and then union them.
我是Spark新手。我相信我的數據源真的是一個「文件夾」(如base/top_folder/year=x/month=y/*.parquet
)的集合,我想加載所有文件並進行轉換。
感謝您的幫助!
- 更新1:我已經看過Dataproc控制檯,創建羣集時無法設置「選項」。
- 更新2:我檢查了羣集的「cluster.properties」文件,並且沒有這樣的選項。難道是我必須添加一個並重置羣集?對木地板partition discovery
我希望有一種方法來加載通配符中的所有數據集。沒有看起來這樣的事情。謝謝。 – jldupont