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: 

Special character data preservation

Priya_Data_Eng
New Contributor
  1. This data frame has two columns name and info. Name has value as John and info has vale as 1® VOC.

After writing this data, I can read correct values in databricks but when I download the csv file and load it in notepad ( utf-8 ) , it is showing no values.

even if I click on edit in container, it is showing empty values.

What can be the reason? And what is the solution ?

df. write. format (‘csv').option ('header', True).option( 'encoding', 'UTF-8').option(' sep', '|^|’) .mode ('overwrite'). save('/mnt/Filestore/data/job1/test.dta')

1 REPLY 1

amr
Valued Contributor

Try to read the file back into databricks using spark.read, do you the see the charchaters showing? if yes, then it is an editor problem, use another editor such as Notepad++, if not, then the data is not on the write encoder, try different encoder other than UTF-8, maybe UTF-16

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