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: 

If someone saves a flat file in a Databricks notebook without specifying a location, where does it go?

User16826992666
Valued Contributor

I ran the code block below and now I can't find the file. Where would this get saved since no location was specified?

Cmd

1 ACCEPTED SOLUTION

Accepted Solutions

sean_owen
Databricks Employee
Databricks Employee

In this case, you are just writing a file to the working directory of the driver process. It'll be under something like /home/[user] on the local file system. Anything you write to "/dbfs/..." however goes to distributed storage, even though it looks like a regular file. That would go into your 'root bucket' unless you write to a DBFS path under which another bucket has been mounted.

View solution in original post

2 REPLIES 2

sean_owen
Databricks Employee
Databricks Employee

In this case, you are just writing a file to the working directory of the driver process. It'll be under something like /home/[user] on the local file system. Anything you write to "/dbfs/..." however goes to distributed storage, even though it looks like a regular file. That would go into your 'root bucket' unless you write to a DBFS path under which another bucket has been mounted.

jecastelo
New Contributor II

/Workspace/Users/your.email@companyname.com/myfile.txt

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