apache/seatunnel · error · BigtableConnectorException

READ_FAILED

READ_FAILED

Error message

Unsupported data type: 

What it means

BigtableDeserializationFormat.deserializeCell throws BigtableConnectorException (READ_FAILED) when a Bigtable cell's byte payload must be converted to a SeaTunnel type whose SqlType has no deserialization branch. The default case in the switch over field types is reached for an unmapped SQL type.

Source

Thrown at seatunnel-connectors-v2/connector-google-bigtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/bigtable/format/BigtableDeserializationFormat.java:114

                } catch (NumberFormatException e) {
                    return new BigDecimal(ByteBuffer.wrap(bytes).getFloat());
                }
            case DATE:
                return LocalDate.parse(
                        new String(bytes, StandardCharsets.UTF_8),
                        DateTimeFormatter.ofPattern(dateFormat.getValue()));
            case TIME:
                return LocalTime.parse(
                        new String(bytes, StandardCharsets.UTF_8),
                        DateTimeFormatter.ofPattern(timeFormat.getValue()));
            case TIMESTAMP:
                return LocalDateTime.parse(
                        new String(bytes, StandardCharsets.UTF_8),
                        DateTimeFormatter.ofPattern(datetimeFormat.getValue()));
            case STRING:
                return new String(bytes, StandardCharsets.UTF_8);
            default:
                throw new BigtableConnectorException(
                        BigtableConnectorErrorCode.READ_FAILED,
                        "Unsupported data type: " + fieldType.getSqlType());
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Change the column's SeaTunnel type in the schema config to a supported scalar type (STRING, INT, BIGINT, BOOLEAN, DOUBLE, TIMESTAMP, etc.)
  2. Store complex values as serialized strings (JSON) and read them as STRING, then transform downstream
  3. Extend deserializeCell to add a deserialization branch for the needed SqlType
  4. Review the schema mapping so unsupported types are not mapped from Bigtable columns

Example fix

// before
schema = {
  tags = ARRAY<STRING>
}
// after
schema = {
  tags = STRING  // JSON-encoded array stored in Bigtable
}
Defensive patterns

Strategy: validation

Validate before calling

Set<SqlType> supported = Set.of(SqlType.STRING, SqlType.INT, SqlType.BIGINT,
    SqlType.BOOLEAN, SqlType.DOUBLE, SqlType.FLOAT, SqlType.TIMESTAMP, SqlType.DATE);
for (Column c : schema.getColumns()) {
  if (!supported.contains(c.getSqlType()))
    throw new IllegalArgumentException("Bigtable column unsupported: " + c.getName() + " " + c.getSqlType());
}

Type guard

boolean isScalarSqlType(SqlType t) {
  return t != SqlType.ARRAY && t != SqlType.MAP && t != SqlType.ROW;
}

Try / catch

try {
  Object v = format.deserializeCell(bytes, fieldType);
} catch (BigtableConnectorException e) {
  if (e.getErrorCode() == BigtableConnectorErrorCode.READ_FAILED)
    LOG.error("Map Bigtable column to a supported scalar type: {}", e.getMessage());
}

Prevention

When it happens

Trigger: deserializeCell reads a column whose configured/family-mapped fieldType.getSqlType() falls into the switch's default branch (e.g. ARRAY, MAP, ROW or other complex types not supported by the Bigtable deserializer).

Common situations: Sink/source schema declares complex types (arrays, maps) for columns stored in Bigtable; schema drift after table changes; user maps a Bigtable column family to an unsupported SeaTunnel data type.

Related errors


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