cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

File copy from local to dbfs

Teja07
New Contributor II

How to copy a file from local disk to databricks dbfs path. I tried as below but it is throwing me error:

code i tried: dbutils.fs.cp("file://c:/user/file.txt",dbfs/data/) and dbutils.fs.cp("file:///c:/user/file.txt",dbfs/data/)

error: File not found excdeption

2 REPLIES 2

Ajay-Pandey
Esteemed Contributor III

@Mani Teja G​ ,

Are u using databricks CLI??

venkatcrc
New Contributor III

I assume you cannot copy files from Local machine to dbfs using dbutils. you can upload files to dbfs using below gui option .

Data --> Browse DFS --> Upload

image.png 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.