Details
Description
Currently, CSV data source write DateType and TimestampType as below:
+----------------+ | date| +----------------+ |1440637200000000| |1414459800000000| |1454040000000000| +----------------+
It would be nicer if it write dates and timestamps as a formatted string just like JSON data sources.
Also, CSV data source currently supports dateFormat option to read dates and timestamps in a custom format. It might be better if this option can be applied in writing as well.
Attachments
Issue Links
- duplicates
-
SPARK-16597 DataFrame DateType is written as an int(Days since epoch) by csv writer
- Closed
- is duplicated by
-
SPARK-17066 dateFormat should be used when writing dataframes as csv files
- Resolved
-
SPARK-17923 dateFormat unexpected kwarg to df.write.csv
- Resolved
- links to