'Spark : Store data frame into CSV with unicode separator \u2592
Looking to store spark dataframe into csv, but columns need to be separated with unicode \u2592
considering my dataframe name is myDf
myDf.option("header",true)
.option("encoding", "......")
.option("delimiter", ".....")
.csv(s"$path")
data should look like
my_cd▒my_cd▒flag_cd
00000051▒R▒Y
00000051▒R▒Y
0000007a▒D▒Y
Solution 1:[1]
Finally I found the solution, I was trying delimiter. You can pass any unicode of desire separator as below option("sep","\u2592"). It worked for me.
myDf.option("header",true)
.option("sep", "\u2592")
.csv(s"$path")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shan Hadoop Learner |
