I have the below folder structure on ADLS gen2:
abfss://[email protected]/original_data/
which has the below folders inside it.
abc1/<child_folder_main>
abc2/<child_folder_main>
abc_34/<child_folder_main>
xyf_11/<child_folder_main>
sjw93/<child_folder_main>
But the issue here is that the names of the first folder inside the original_data
directory is not properly known and needs to be extracted at runtime based on the name of its corresponding <child_folder_main>
.
In short, I need to input the real name of the child_folder_main
and I want to output abc1
or abc_34
or xyf_11
or whatever it’s parent folder name is based on the given input.
I’m using dbutils.fs
operations. But I don’t know how to achieve this. Can someone please help?