{"record":{"id":"7c0523ddb7c008f7","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-7c0523","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which is precision less than 0, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which is precision less than 0, it will be converted to decimal\\((.+?),(.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/snowflake/SnowflakeTypeConverter.java","lineNumber":219,"sourceCode":"                builder.columnType(SNOWFLAKE_SMALLINT);\n                builder.dataType(SNOWFLAKE_SMALLINT);\n                break;\n            case INT:\n                builder.columnType(SNOWFLAKE_INTEGER);\n                builder.dataType(SNOWFLAKE_INTEGER);\n                break;\n            case BIGINT:\n                builder.columnType(SNOWFLAKE_BIGINT);\n                builder.dataType(SNOWFLAKE_BIGINT);\n                break;\n            case DECIMAL:\n                DecimalType decimalType = (DecimalType) column.getDataType();\n                long precision = decimalType.getPrecision();\n                int scale = decimalType.getScale();\n                if (precision <= 0) {\n                    precision = DEFAULT_PRECISION;\n                    scale = DEFAULT_SCALE;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which is precision less than 0, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            scale);\n                } else if (precision > MAX_PRECISION) {\n                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));\n                    precision = MAX_PRECISION;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which exceeds the maximum precision of {}, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/snowflake/SnowflakeTypeConverter.java#L201-L237","documentation":"During Snowflake DECIMAL column conversion (SnowflakeTypeConverter.reconvert), the column's declared precision was <= 0, which Snowflake cannot represent. SeaTunnel silently substitutes the default precision/scale (38,10 by default) and logs this warning instead of failing. The job continues, but the resulting DDL may not match the source column.","triggerScenarios":"A catalog table schema carries a DecimalType column whose precision is 0 or negative; this typically happens when the source metadata reports an unspecified/invalid decimal precision and reconvert() is invoked to build Snowflake DDL or type mapping.","commonSituations":"Syncing tables from sources that report DECIMAL without precision (e.g. some CDC payloads or generic JDBC drivers reporting precision 0); programmatically built Column definitions with unset precision.","solutions":["Fix the upstream schema so the decimal column carries a valid precision (> 0).","If the source cannot provide precision, pre-create the Snowflake table with the intended DECIMAL(p,s) so schema conversion is not needed.","Explicitly set precision when constructing the column in your config/pipeline instead of relying on defaults.","Ignore the warning if falling back to decimal(38,10) is acceptable for your data."],"exampleFix":"// before: Column with DecimalType(precision=0)\nnew DecimalType(0, 10)\n// after\nnew DecimalType(38, 10)","handlingStrategy":"validation","validationCode":"if (column.getDataType() instanceof DecimalType) {\n    DecimalType dt = (DecimalType) column.getDataType();\n    if (dt.getPrecision() <= 0) {\n        // fix or log before submitting to Snowflake converter\n        log.warn(\"Column {} has invalid precision {}\", column.getName(), dt.getPrecision());\n    }\n}","typeGuard":"boolean hasValidPrecision(Column c) {\n    return c.getDataType() instanceof DecimalType\n        && ((DecimalType) c.getDataType()).getPrecision() > 0;\n}","tryCatchPattern":null,"preventionTips":["Always declare explicit precision for DECIMAL columns in source schemas","Check source JDBC metadata reports non-zero precision for decimals","Pre-create Snowflake tables for columns with unreliable source metadata"],"tags":["jdbc","snowflake","decimal-precision","type-conversion"],"backgroundTag":"value-out-of-range","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}