{"record":{"id":"eb91e4ecfea539e8","repo":"apache/seatunnel","slug":"common-17-eb91e4","errorCode":"COMMON-17","errorMessage":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.","messagePattern":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type\\.","errorType":"error_code","errorClass":"org.apache.seatunnel.common.exception.SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/snowflake/SnowflakeDataTypeConvertor.java","lineNumber":152,"sourceCode":"            case SNOWFLAKE_GEOMETRY:\n                return BasicType.STRING_TYPE;\n            case SNOWFLAKE_BINARY:\n            case SNOWFLAKE_VARBINARY:\n            case SNOWFLAKE_GEOGRAPHY:\n                return PrimitiveByteArrayType.INSTANCE;\n            case SNOWFLAKE_DATE:\n                return LocalTimeType.LOCAL_DATE_TYPE;\n            case SNOWFLAKE_TIME:\n                return LocalTimeType.LOCAL_TIME_TYPE;\n            case SNOWFLAKE_DATE_TIME:\n            case SNOWFLAKE_TIMESTAMP:\n            case SNOWFLAKE_TIMESTAMP_NTZ:\n                return LocalTimeType.LOCAL_DATE_TIME_TYPE;\n            case SNOWFLAKE_TIMESTAMP_LTZ:\n            case SNOWFLAKE_TIMESTAMP_TZ:\n                return LocalTimeType.OFFSET_DATE_TIME_TYPE;\n            default:\n                throw CommonError.convertToSeaTunnelTypeError(\n                        DatabaseIdentifier.SNOWFLAKE, connectorDataType, field);\n        }\n    }\n\n    @Override\n    public String toConnectorType(\n            String field,\n            SeaTunnelDataType<?> seaTunnelDataType,\n            Map<String, Object> dataTypeProperties) {\n        checkNotNull(seaTunnelDataType, \"seaTunnelDataType cannot be null\");\n        SqlType sqlType = seaTunnelDataType.getSqlType();\n\n        switch (sqlType) {\n            case TINYINT:\n            case SMALLINT:\n                return SNOWFLAKE_SMALLINT;\n            case INT:\n                return SNOWFLAKE_INTEGER;","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/snowflake/SnowflakeDataTypeConvertor.java#L134-L170","documentation":"SnowflakeDataTypeConvertor.toSeaTunnelType maps Snowflake connector catalog data types to SeaTunnel types. Any Snowflake type that reaches the switch default has no configured mapping and throws COMMON-17 convertToSeaTunnelTypeError with DatabaseIdentifier.SNOWFLAKE, the connector data type, and the field name.","triggerScenarios":"Catalog/schema conversion of a Snowflake column whose ConnectorDataType is not handled by the switch — e.g. rare Snowflake types like VARIANT, OBJECT, ARRAY, GEOGRAPHY, or BINARY that lack a case in toSeaTunnelType.","commonSituations":"Reading Snowflake tables containing semi-structured VARIANT/OBJECT/ARRAY columns; GEOGRAPHY/GEOMETRY columns; BLOB-like binary columns not mapped by this converter version.","solutions":["Identify the unsupported Snowflake type from the error message and cast it in the source query (e.g. TO_VARCHAR(variant_col))","Change the table schema to use supported types (string, numeric, timestamp, boolean)","Upgrade SeaTunnel to a version with broader Snowflake type support","Add the missing case to SnowflakeDataTypeConvertor.toSeaTunnelType in a custom build"],"exampleFix":"// before\nSELECT variant_col FROM t;\n// after\nSELECT TO_VARCHAR(variant_col) AS variant_col FROM t;","handlingStrategy":"validation","validationCode":"-- Check for semi-structured columns before configuring the JDBC catalog\nSELECT column_name, data_type FROM information_schema.columns\nWHERE table_name = 'MY_TABLE'\n  AND data_type IN ('VARIANT','OBJECT','ARRAY','GEOGRAPHY','GEOMETRY','BINARY');","typeGuard":"boolean isSupportedSnowflakeType(String snowflakeType) {\n    return java.util.List.of(\"NUMBER\",\"DECIMAL\",\"INT\",\"FLOAT\",\"BOOLEAN\",\n            \"VARCHAR\",\"CHAR\",\"DATE\",\"TIME\",\"TIMESTAMP_NTZ\",\n            \"TIMESTAMP_LTZ\",\"TIMESTAMP_TZ\")\n        .contains(snowflakeType.toUpperCase());\n}","tryCatchPattern":null,"preventionTips":["Avoid VARIANT/OBJECT/ARRAY columns in tables read via the JDBC catalog","Cast semi-structured columns with TO_VARCHAR in a source query or view","Pre-check information_schema for unsupported data types","Upgrade SeaTunnel for broader Snowflake type coverage"],"tags":["snowflake","jdbc","type-conversion","catalog"],"backgroundTag":"unsupported-dtype","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"}