You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,13 @@ In this case, to use local XSD `/foo/bar.xsd`, call `addFile("/foo/bar.xsd")` an
88
88
for example, be treated as if both are just `<author>`. Note that, at the moment, namespaces cannot be ignored on the
89
89
`rowTag` element, only its children. Note that XML parsing is in general not namespace-aware even if `false`.
90
90
Defaults to `false`. New in 0.11.0.
91
+
*`timestampFormat`: Specifies an additional timestamp format that will be tried when parsing values as `TimestampType`
92
+
columns. The format is specified as described in [DateTimeFormatter](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).
93
+
Defaults to try several formats, including [ISO_INSTANT](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT),
94
+
including variations with offset timezones or no timezone (defaults to UTC). New in 0.12.0.
95
+
*`dateFormat`: Specifies an additional timestamp format that will be tried when parsing values as `DateType`
96
+
columns. The format is specified as described in [DateTimeFormatter](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).
97
+
Defaults to [ISO_DATE](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_DATE). New in 0.12.0.
91
98
92
99
When writing files the API accepts several options:
93
100
@@ -98,6 +105,12 @@ When writing files the API accepts several options:
98
105
*`attributePrefix`: The prefix for attributes so that we can differentiating attributes and elements. This will be the prefix for field names. Default is `_`.
99
106
*`valueTag`: The tag used for the value when there are attributes in the element having no child. Default is `_VALUE`.
100
107
*`compression`: compression codec to use when saving to file. Should be the fully qualified name of a class implementing `org.apache.hadoop.io.compress.CompressionCodec` or one of case-insensitive shorten names (`bzip2`, `gzip`, `lz4`, and `snappy`). Defaults to no compression when a codec is not specified.
108
+
*`timestampFormat`: Controls the format used to write `TimestampType` format columns.
109
+
The format is specified as described in [DateTimeFormatter](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).
110
+
Defaults to [ISO_INSTANT](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT). New in 0.12.0.
111
+
*`dateFormat`: Controls the format used to write `DateType` format columns.
112
+
The format is specified as described in [DateTimeFormatter](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).
113
+
Defaults to [ISO_DATE](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_DATE). New in 0.12.0.
101
114
102
115
Currently it supports the shortened name usage. You can use just `xml` instead of `com.databricks.spark.xml`.
0 commit comments