我正在列出文件
Azure Datalake Store gen1
使用以下命令成功:
dbutils.fs.ls('mnt/dbfolder1/projects/clients')
这个文件夹的结构是
- client_comp_automotive_1.json [File]
- client_comp_automotive_2.json [File]
- client_comp_automotive_3.json [File]
- client_comp_automotive_4.json [File]
- PROCESSED [Folder]
我想把那些(
.json
)将此文件夹中的文件逐个处理,以便我可以处理错误或其他问题,并将成功处理的文件移动到子文件夹中。
我该怎么做
python
. 我试过了
folder = dbutils.fs.ls('mnt/dbfolder1/projects/clients')
files = [f for f in os.listdir(folder) if os.path.isfile(f)]
os
是未知的。我怎样才能做到
Databricks
?