If we have a folder folder
having all .txt
files, we can read them all using sc.textFile("folder/*.txt")
. But what if I have a folder folder
containing even more folders named datewise, like, 03
, 04
, ..., which further contain some .log
files. How do I read these in Spark?
In my case, the structure is even more nested & complex, so a general answer is preferred.