apache/seatunnel · warning

The timestamp column {} type timestamp({}) is out of range,

Error message

The timestamp column {} type timestamp({}) is out of range, which exceeds the maximum scale of {}, it will be converted to timestamp({})

What it means

Warning from OracleTypeConverter.reconvert for timestamp-without-timezone columns: the column's scale (fractional-second precision) exceeds MAX_TIMESTAMP_SCALE (Oracle supports up to 9), so the timestamp is converted with the clamped scale. The message states the original timestamp(scale), the max, and the resulting timestamp(max).

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeConverter.java:414

                            String.format("%s(%s)", ORACLE_VARCHAR2, column.getColumnLength()));
                    builder.dataType(ORACLE_VARCHAR2);
                } else {
                    builder.columnType(ORACLE_CLOB);
                    builder.dataType(ORACLE_CLOB);
                }
                break;
            case DATE:
                builder.columnType(ORACLE_DATE);
                builder.dataType(ORACLE_DATE);
                break;
            case TIMESTAMP:
                // NTZ: maps to ORACLE_TIMESTAMP (without timezone)
                if (column.getScale() == null || column.getScale() <= 0) {
                    builder.columnType(ORACLE_TIMESTAMP);
                } else {
                    int timestampScale = column.getScale();
                    if (timestampScale > MAX_TIMESTAMP_SCALE) {
                        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(),
                                timestampScale,
                                MAX_TIMESTAMP_SCALE,
                                MAX_TIMESTAMP_SCALE);
                        timestampScale = MAX_TIMESTAMP_SCALE;
                    }
                    builder.columnType(String.format("TIMESTAMP(%s)", timestampScale));
                    builder.scale(timestampScale);
                }
                builder.dataType(ORACLE_TIMESTAMP);
                break;
            case TIMESTAMP_TZ:
                // LTZ: maps to ORACLE_TIMESTAMP_WITH_LOCAL_TIME_ZONE
                if (column.getScale() == null || column.getScale() <= 0) {
                    builder.columnType(ORACLE_TIMESTAMP_WITH_LOCAL_TIME_ZONE);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Truncate the timestamp upstream to ≤9 fractional digits, e.g. DATE_TRUNC/TRUNC to microseconds or nanoseconds.
  2. Create the Oracle table with the desired TIMESTAMP(9) explicitly.
  3. If sub-nanosecond digits are meaningful, they cannot be stored in Oracle — keep them in a separate string column.
  4. Accept the clamp if only millisecond/microsecond precision is needed.

Example fix

// before
ev_ts timestamp(scale=12)
// after (upstream)
ev_ts = date_trunc(ev_ts, 'nanoseconds'); -- scale ≤ 9
Defensive patterns

Strategy: validation

Validate before calling

if (column.getScale() != null && column.getScale() > 9) {
  // truncate upstream: date_trunc(ts, 'nanoseconds')
}

Type guard

boolean isOracleSafeTimestamp(Integer scale) {
  return scale == null || (scale >= 0 && scale <= 9);
}

Prevention

When it happens

Trigger: reconvert on a Column mapped to ORACLE_TIMESTAMP where getScale() > MAX_TIMESTAMP_SCALE, e.g. a source timestamp with scale 12 in auto schema creation for Oracle sink.

Common situations: Engines that allow >9 fractional digits (some analytic systems) syncing timestamps into Oracle via auto DDL; chained pipelines carrying inflated timestamp scales.

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


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/0e769b595825adcd. Report an issue: GitHub.