apache/beam · error · UnsupportedOperationException
Field type ' ' is not supported (field ' ')
Error message
Field type '{dcFieldType}' is not supported (field '{column}') What it means
SchemaUtils.getBeamFieldType throws this when a Data Catalog column's type string is not one of the supported primitive types (INT64, FLOAT64, STRING, BOOL, TIMESTAMP, STRUCT, etc.). The type cannot be mapped to a Beam FieldType.
Solutions
- Change the column type to a supported one (INT64, FLOAT64, STRING, BOOL, TIMESTAMP, STRUCT)
- Map unsupported types to supported equivalents before registering (e.g. NUMERIC -> FLOAT64)
- Extend SchemaUtils with a mapping if you control the code and need the type
Example fix
// before
column.setType('NUMERIC')
// after
column.setType('FLOAT64') Defensive patterns
Strategy: validation
Validate before calling
java.util.Set<String> ok = java.util.Set.of("INT64","FLOAT64","STRING","BOOL","TIMESTAMP","STRUCT","MAP");
for (ColumnSchema c : schema.getColumnsList()) {
if (!ok.contains(c.getType())) throw new IllegalArgumentException("Unsupported type: " + c.getType());
} Type guard
static boolean isSupportedDcType(ColumnSchema c) {
return java.util.Arrays.asList("INT64","FLOAT64","STRING","BOOL","TIMESTAMP","STRUCT").contains(c.getType());
} Try / catch
try {
Schema s = SchemaUtils.fromDataCatalog(dcSchema);
} catch (UnsupportedOperationException ex) {
LOG.error("Unsupported DC field type", ex);
} Prevention
- Stick to the documented primitive types when creating DataCatalog schemas
- Downcast exotic types (NUMERIC/BYTES) to supported ones at write time
- Track SchemaUtils for newly added type support before upgrading
When it happens
Trigger: A column in the Data Catalog schema has an unmapped type string (e.g. BYTES, NUMERIC, or a custom type) during DC->Beam schema conversion.
Common situations: Schemas authored in Data Catalog with types Beam SQL does not yet support, or type names differing in case/spelling from the expected constants.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Array of arrays not supported in DataCatalog schemas
- Entry doesn't have a schema. Please attach a schema to
- Field mode ' ' is not supported (field ' ')
- Nullable array element type is not supported in DataCatalog…
- Nullable array type is not supported in DataCatalog schemas
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/f09647d182a060a0.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/SchemaUtils.java:98
"Field mode '" + column.getMode() + "' is not supported (field '" + name + "')");
}
return field;
}
private static FieldType getBeamFieldType(ColumnSchema column) {
String dcFieldType = column.getType();
if (FIELD_TYPES.containsKey(dcFieldType)) {
return FIELD_TYPES.get(dcFieldType);
}
if ("STRUCT".equals(dcFieldType)) {
Schema structSchema = fromColumnsList(column.getSubcolumnsList());
return FieldType.row(structSchema);
}
throw new UnsupportedOperationException(
"Field type '" + dcFieldType + "' is not supported (field '" + column.getColumn() + "')");
}
/** Convert Beam schema to DataCatalog schema. */
static com.google.cloud.datacatalog.v1beta1.Schema toDataCatalog(Schema schema) {
com.google.cloud.datacatalog.v1beta1.Schema.Builder schemaBuilder =
com.google.cloud.datacatalog.v1beta1.Schema.newBuilder();
for (Schema.Field field : schema.getFields()) {
schemaBuilder.addColumns(fromBeamField(field));
}
return schemaBuilder.build();
}
private static ColumnSchema fromBeamField(Schema.Field field) {
Schema.FieldType fieldType = field.getType();
if (fieldType.getTypeName().equals(Schema.TypeName.ARRAY)) {
if (fieldType.getNullable()) {
throw new UnsupportedOperationException(View on GitHub (pinned to 12126d8942)