Ao inves disso:
for item in dbutils.fs.ls('/databricks-datasets/bikeSharing/'):
if item.size!=0:
dbutils.fs.mv(
f'/FileStore/{item.name}',
'/FileStore/tables/aula-databricks/projetoBike'
)
else:
dbutils.fs.mv(
f'/FileStore/{item.name}',
f'/FileStore/tables/aula-databricks/projetoBike/{item.name}',
recurse=True
)
Não deveria ser assim:
for item in dbutils.fs.ls('/FileStore/'):
if item.size!=0:
dbutils.fs.mv(
f'/FileStore/{item.name}',
'/FileStore/tables/aula-databricks/projetoBike'
)
else:
dbutils.fs.mv(
f'/FileStore/{item.name}',
f'/FileStore/tables/aula-databricks/projetoBike/{item.name}',
recurse=True
)