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:Ā 

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??

Ajay Kumar Pandey

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 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonā€™t want to miss the chance to attend and share knowledge.

If there isnā€™t a group near you, start one and help create a community that brings people together.

Request a New Group