cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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.

Kaniz
Community Manager
Community Manager

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

Kaniz
Community Manager
Community Manager

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

sgannavaram
New Contributor III

Yes, Kaniz

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.