cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Moving files from Volume to Workspace

Aviraldb
Visitor

Hello Team,

I am trying to move some files from volume to 

%sh
databricks fs cp dbfs:/Volumes/workspace/default/delc/generated_scripts/*.py Workspace/Shared/Delc_Project/scripts/
 
I tried all ways , Please help me to move them  @DataBricks @Louis_Frolio 

 @BS_THE_ANALYST  @-werners- 


 

2 REPLIES 2

Raman_Unifeye
Contributor III

You're running into an error because the fs cp command is to copy files between cloud storage locations (like DBFS, Volumes, or external storage) and does not support copying directly into the Databricks Workspace repos path, which starts with /Workspace/Shared/.

The Workspace path is accessed via Git repositories (Repos), which use a different protocol than cloud storage.

You should try 'databricks workspace import'


RG #Driving Business Outcomes with Data Intelligence

Coffee77
Contributor III

Take a look to this documentation: https://docs.databricks.com/aws/en/files/ Here are the different ways of working with files in Databricks depending on source. I would recommend to copy files from cloud storage to catalog volumes and then, process file as needed.

 


Lifelong Learner Cloud & Data Solution Architect | https://www.youtube.com/@CafeConData