I am trying to move the file from one folder to another folder using databricks python notebook. My source is azure data lake gen 1.
Suppose, my file is present adl://testdatalakegen12021.azuredatalakestore.net/source/test.csv and I am trying to move the file from adl://testdatalakegen12021.azuredatalakestore.net/demo/test.csv to adl://testdatalakegen12021.azuredatalakestore.net/destination/movedtest.csv
I tried various logic but not none of my code is working fine.
# Move a file by renaming it's path
import os
import shutil
os.rename('adl://testdatalakegen12021.azuredatalakestore.net/demo/test.csv', 'adl://testdatalakegen12021.azuredatalakestore.net/demo/renamedtest.csv')
# Move a file from the directory d1 to d2
shutil.move('adl://testdatalakegen12021.azuredatalakestore.net/demo/test.csv', 'adl://testdatalakegen12021.azuredatalakestore.net/destination/renamedtest.csv')
Please, let me know If I am using correct logic as I am executing this on databricks, not in my local.


