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
Adds a new `default_timestamp_unit` configuration field to the
`parquet_encode` processor, accepting `NANOSECOND` (default, preserves
existing behaviour), `MICROSECOND`, or `MILLISECOND`.
The unit is applied to both the static schema path and the dynamic
`schema_metadata` path (used by CDC inputs such as `mysql_cdc`).
`TIMESTAMP(NANOS)` is not readable by Apache Spark / Databricks, AWS
Athena or DuckDB; this field unblocks those consumers without requiring
a pre-encoding transform. MySQL sources additionally cannot exceed
microsecond precision, so `MICROSECOND` is lossless for CDC pipelines.
Resolves the long-standing TODO referenced at
#3570.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,12 @@ Changelog
3
3
4
4
All notable changes to this project will be documented in this file.
5
5
6
+
## Unreleased
7
+
8
+
### Added
9
+
10
+
- parquet_encode: Added `default_timestamp_unit` field (values `NANOSECOND`, `MICROSECOND`, `MILLISECOND`) controlling the precision of TIMESTAMP logical types. Default remains `NANOSECOND` for backwards compatibility. Use `MICROSECOND` when writing files for Apache Spark/Databricks, AWS Athena or DuckDB, which do not support `TIMESTAMP(NANOS)`. ([#3570](https://github.com/redpanda-data/connect/issues/3570))
Copy file name to clipboardExpand all lines: docs/modules/components/pages/processors/parquet_encode.adoc
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ parquet_encode:
56
56
schema_metadata: ""
57
57
default_compression: uncompressed
58
58
default_encoding: DELTA_LENGTH_BYTE_ARRAY
59
+
default_timestamp_unit: NANOSECOND
59
60
```
60
61
61
62
--
@@ -216,4 +217,19 @@ Options:
216
217
, `PLAIN`
217
218
.
218
219
220
+
=== `default_timestamp_unit`
221
+
222
+
The precision used when encoding TIMESTAMP logical types. The default `NANOSECOND` matches historical behaviour, but `TIMESTAMP(NANOS)` is not readable by Apache Spark (Databricks), AWS Athena or DuckDB; set this to `MICROSECOND` (or `MILLISECOND`) when writing Parquet files intended for consumption by those engines.
Description("The precision used when encoding TIMESTAMP logical types. The default `NANOSECOND` matches historical behaviour, but `TIMESTAMP(NANOS)` is not readable by Apache Spark (Databricks), AWS Athena or DuckDB; set this to `MICROSECOND` (or `MILLISECOND`) when writing Parquet files intended for consumption by those engines.").
56
+
Default("NANOSECOND").
57
+
Advanced(),
52
58
).
53
59
Description(`
54
60
This processor uses https://github.com/parquet-go/parquet-go[https://github.com/parquet-go/parquet-go^], which is itself experimental. Therefore changes could be made into how this processor functions outside of major version releases.
0 commit comments