โ12-17-2024 03:08 PM
Hi! From a Databricks job, i want to copy a workspace file into volume. how can i do that?
I tried
โ12-17-2024 04:29 PM
Hi @lauraxyz,
You can give it a try using: dbutils.fs.cp("file:/Workspace/path/to/the/file", "/Volumes/path/to/destination")
โ12-17-2024 09:02 PM
by adding "file:", i'm able to put File type into Volume, but for Notebook type, i would get following error:
ExecutionError: An error occurred while calling o460.cp. : java.io.FileNotFoundException: /Workspace/path/to/the/file (Operation not supported)
How does it work for Notebook type of file? I tried replace "file:" with "notebook:" or "Notebook:", neither works
โ12-18-2024 04:50 AM
Let me try it on my end and get back, looks like we need to upload the destination location to a dbfs location first then a volumen.
โ12-18-2024 12:33 PM
Found the reason! It's the runtime, it doesn't work on Databricks Runtime Version 15.4 LTS, but started to work after changing to 16.0. Maybe this is something supported from the latest version?
โ07-24-2025 03:55 AM
I do have one question, i think this post is the best suitable. I do want to override a wheel files into a Volume i do have already created in my CICD process. I do have something like this:
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now