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

Write output of DataFrame to a file with tild ( ~) separator in Databricks Mount or Storage Mount with VM.

sgannavaram
New Contributor III

I need to write output of Data Frame to a file with tilde ( ~) separator in Databricks Mount or Storage Mount with VM. 

Could you please help with some sample code if you have any?

1 ACCEPTED SOLUTION

Accepted Solutions

Hubert-Dudek
Esteemed Contributor III

@Srinivas Gannavaramโ€‹ ,

Does it have to be CSV with fields separated by ~?

If yes is enough to add .option("sep", "~")

(df
.write
.option("sep", "~")
.csv(mount_path))

View solution in original post

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

@Srinivas Gannavaramโ€‹ ,

Does it have to be CSV with fields separated by ~?

If yes is enough to add .option("sep", "~")

(df
.write
.option("sep", "~")
.csv(mount_path))

Thank you Hubert, It's helpful.

Hi @Srinivas Gannavaramโ€‹ , Great to hear that you got an answer. Would you like to mark @Hubert Dudekโ€‹ 's answer as the best?

Kaniz_Fatma
Community Manager
Community Manager

Hi @Srinivas Gannavaramโ€‹ , How are you? Does the code provided by @Hubert Dudekโ€‹ help you?

Yes, Kaniz

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!