mrchristine / db-migration

Databricks Migration Tools
Other
43 stars 27 forks source link

Error when import into azure #26

Closed saldroubi closed 4 years ago

saldroubi commented 4 years ago

Export for azure created a folder called azure_logs, however, the import is looking for a folder called logs. Here is an example: % python3 import_db.py --azure --workspace Import the complete workspace at 2020-09-01 12:59:00.020444 Import on https://adb-5463815377663355.15.azuredatabricks.net Traceback (most recent call last): File "import_db.py", line 123, in main() File "import_db.py", line 49, in main ws_c.import_all_workspace_items(archive_missing=False) File "/Users/saldroubi/Dropbox/git/db-migration/dbclient/WorkspaceClient.py", line 364, in import_all_workspace_items num_exported_users = self.get_num_of_saved_users(src_dir) File "/Users/saldroubi/Dropbox/git/db-migration/dbclient/WorkspaceClient.py", line 82, in get_num_of_saved_users ls = os.listdir(user_home_dir) FileNotFoundError: [Errno 2] No such file or directory: 'logs/artifacts/Users'

The workaround for me was to rename azure_logs to logs. Should the default for azure import use the same as the export directory as a quick fix?

mrchristine commented 4 years ago

Thanks for reporting this. Yes, I had a hard coded value in the import when it should be using the configured attributed. Fixed!