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
Contributor III
Contributor III

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

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!