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
Databricks Employee
Databricks Employee

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