apache/seatunnel · warning
The decimal column type decimal( , ) is out of range, which…
Error message
The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum precision of {}, it will be converted to decimal({},{}) What it means
When converting a DECIMAL column for Snowflake, the declared precision exceeds Snowflake's maximum (38). SeaTunnel clamps precision to 38 and reduces the scale by the same amount (never below 0), logging this warning. Data with more significant digits may lose fractional precision after the conversion.
Solutions
- Reduce the source column precision to <= 38 (ALTER TABLE on the source) so no precision is truncated.
- Pre-create the Snowflake target table and cast/round the value in the pipeline before writing.
- Review the warning to confirm the clamped decimal(p,s) preserves the digits you need; adjust source scale accordingly.
- If exact precision matters, switch the column to STRING in the pipeline to avoid numeric truncation.
Example fix
// before new DecimalType(65, 30) // after: fits Snowflake max precision 38 new DecimalType(38, 10)
Defensive patterns
Strategy: validation
Validate before calling
DecimalType dt = (DecimalType) column.getDataType();
if (dt.getPrecision() > 38) {
log.warn("Column {} precision {} exceeds Snowflake max 38; will be clamped",
column.getName(), dt.getPrecision());
} Type guard
boolean fitsSnowflakePrecision(Column c) {
return !(c.getDataType() instanceof DecimalType)
|| ((DecimalType) c.getDataType()).getPrecision() <= 38;
} Prevention
- Keep decimal precision <= 38 when targeting Snowflake
- Review wide-decimal columns (e.g. MySQL decimal(65,x)) before sync
- Pre-create Snowflake DDL and cast in-pipeline when precision must exceed 38
When it happens
Trigger: reconvert() receives a DecimalType with precision > 38 (Snowflake's MAX_PRECISION), e.g. MySQL decimal(65,30) or similar wide-decimal sources being mapped to Snowflake DDL.
Common situations: MySQL/PostgreSQL sources with decimal(p>38) columns synced into Snowflake; catalog metadata declaring very large precisions from upstream engines that allow bigger precisions than Snowflake.
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 decimal column type decimal( , ) is out of range, which…
- 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/53ae8660afea4422.
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:231
DecimalType decimalType = (DecimalType) column.getDataType();
long precision = decimalType.getPrecision();
int scale = decimalType.getScale();
if (precision <= 0) {
precision = DEFAULT_PRECISION;
scale = DEFAULT_SCALE;
log.warn(
"The decimal column {} type decimal({},{}) is out of range, "
+ "which is precision less than 0, "
+ "it will be converted to decimal({},{})",
column.getName(),
decimalType.getPrecision(),
decimalType.getScale(),
precision,
scale);
} else if (precision > MAX_PRECISION) {
scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));
precision = MAX_PRECISION;
log.warn(
"The decimal column {} type decimal({},{}) is out of range, "
+ "which exceeds the maximum precision of {}, "
+ "it will be converted to decimal({},{})",
column.getName(),
decimalType.getPrecision(),
decimalType.getScale(),
MAX_PRECISION,
precision,
scale);
}
if (scale < 0) {
scale = 0;
log.warn(
"The decimal column {} type decimal({},{}) is out of range, "
+ "which is scale less than 0, "
+ "it will be converted to decimal({},{})",
column.getName(),
decimalType.getPrecision(),View on GitHub (pinned to cf67b549a7)