'Read spark csv with null value without converting to null from an API
We are using an API via spark to copy an '.csv' file and convert it to '.txt' .
This is the body of the API
{....
"outputFileType" : "csv",
"optionList":"delimiter=\t|header=false|emptyValue=null",
"outputFolder": "XXXXX-{YYYY}-{MM}-{dd}-{HH}-{mm}-{ss}.txt",
"targetFileShareName": "X",
}
and this what i get as result : enter image description here
how can i get an empty values instead of null like this result enter image description here
Solution 1:[1]
I used this parametre "nullValue=null" and it solved my probleme
{....
"outputFileType" : "csv",
"optionList":"nullValue=null|delimiter=\t|header=false",
"outputFolder": "XXXXX-{YYYY}-{MM}-{dd}-{HH}-{mm}-{ss}.txt",
"targetFileShareName": "X",
}
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 |
