apache/seatunnel · warning
The timestamp_tz column
Error message
The timestamp_tz column {} type timestamp_tz({}) is out of range, which exceeds the maximum scale of {}, it will be converted to timestamp_tz({}) What it means
When converting a TIMESTAMP_TZ (with time zone) column for Snowflake, its scale exceeds 9, Snowflake's maximum. SeaTunnel logs this warning and maps the column to TIMESTAMP_TZ at scale 9, so fractional seconds beyond nanoseconds are lost.
Solutions
- Set the source timestamptz scale to <= 9.
- Pre-create the Snowflake table with TIMESTAMP_TZ(9) and cast values upstream.
- Accept the warning if nanosecond precision is enough.
- Preserve full precision by mapping the column as STRING.
Example fix
// before new Column with sqlType=TIMESTAMP_TZ, scale=12 // after new Column with sqlType=TIMESTAMP_TZ, scale=9
Defensive patterns
Strategy: validation
Validate before calling
if (column.getScale() != null && column.getScale() > 9) {
log.warn("TIMESTAMP_TZ column {} scale {} will be truncated to 9 for Snowflake",
column.getName(), column.getScale());
} Type guard
boolean fitsSnowflakeTzScale(Column c) {
return c.getScale() == null || c.getScale() <= 9;
} Prevention
- Keep timestamptz scale <= 9 at the source
- Cast to timestamp(9) upstream if finer precision exists
- Preserve verbatim values as STRING when precision loss is unacceptable
When it happens
Trigger: reconvert() handles a Column with sqlType TIMESTAMP_TZ and column.getScale() > 9, e.g. timestamptz(12) source definitions.
Common situations: Sources (e.g. PostgreSQL timestamptz variants with over-declared scale) synced to Snowflake; hand-written schema files specifying scale above 9.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- The timestamp column
- COMMON-17
- COMMON-17
- The decimal column type decimal( , ) is out of range, which…
- The decimal column type decimal( , ) is out of range, which…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8f81d63eafc2ee65.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/snowflake/SnowflakeTypeConverter.java:341
builder.dataType(SNOWFLAKE_TIME);
break;
case TIMESTAMP:
if (column.getScale() != null && column.getScale() > 9) {
log.warn(
"The timestamp column {} type timestamp({}) is out of range, "
+ "which exceeds the maximum scale of {}, "
+ "it will be converted to timestamp({})",
column.getName(),
column.getScale(),
9,
9);
}
builder.columnType(SNOWFLAKE_TIMESTAMP_NTZ);
builder.dataType(SNOWFLAKE_TIMESTAMP_NTZ);
break;
case TIMESTAMP_TZ:
if (column.getScale() != null && column.getScale() > 9) {
log.warn(
"The timestamp_tz column {} type timestamp_tz({}) is out of range, "
+ "which exceeds the maximum scale of {}, "
+ "it will be converted to timestamp_tz({})",
column.getName(),
column.getScale(),
9,
9);
}
builder.columnType(SNOWFLAKE_TIMESTAMP_TZ);
builder.dataType(SNOWFLAKE_TIMESTAMP_TZ);
break;
default:
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.SNOWFLAKE,
column.getDataType().getSqlType().toString(),
column.getName());
}
return builder.build();View on GitHub (pinned to cf67b549a7)