apache/beam · error · UnsupportedOperationException
Converting BigQuery type '' to '' is not supported
Error message
Converting BigQuery type '' to '' is not supported
What it means
Terminal UnsupportedOperationException thrown at the end of BigQueryUtils.fromJsonToBeamField when the BigQuery JSON value's runtime type (String, Number, List, Map, Boolean already handled earlier) has no conversion rule to the requested Beam FieldType. Unlike the other errors this one is not a nullability issue: it means the (javaClass, FieldType) pair is simply unsupported, e.g. a STRUCT value targeting a non-ROW type or a STRING targeting a non-primitive type.
Source
Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java:991
// If this is the case, unwrap the value first
.<@Nullable Object>map(
v ->
(!innerTypeIsMap
&& v instanceof Map
&& ((Map<String, Object>) v).keySet().equals(Sets.newHashSet("v")))
? ((Map<String, Object>) v).get("v")
: v)
.<@Nullable Object>map(v -> toBeamValue(field.withType(collectionElementType), v))
.collect(toList());
}
if (jsonBQValue instanceof Map) {
TableRow tr = new TableRow();
tr.putAll((Map<String, Object>) jsonBQValue);
return toBeamRow(Preconditions.checkArgumentNotNull(fieldType.getRowSchema()), tr);
}
throw new UnsupportedOperationException(
"Converting BigQuery type '"
+ jsonBQValue.getClass()
+ "' to '"
+ fieldType
+ "' is not supported");
}
// TODO: BigQuery shouldn't know about SQL internal logical types.
private static final Set<String> SQL_DATE_TIME_TYPES = ImmutableSet.of("SqlTimeWithLocalTzType");
/**
* Tries to convert an Avro decoded value to a Beam field value based on the target type of the
* Beam field.
*
* <p>For the Avro formats of BigQuery types, see
* https://cloud.google.com/bigquery/docs/exporting-data#avro_export_details and
* https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-avro#avro_conversions
*/View on GitHub (pinned to 12126d8942)
Solutions
- Upgrade Apache Beam to a newer release where more BigQuery types (NUMERIC, GEOGRAPHY, JSON, RANGE) are supported by BigQueryUtils.
- Ensure the Beam FieldType matches the BigQuery type: use FieldType.row(schema) for STRUCT/RECORD values, FieldType.DATETIME for timestamps, FieldType.DECIMAL for NUMERIC.
- Register custom conversion via LogicalType or convert the value to a supported type upstream (e.g. CAST in SQL).
- Add a targeted preprocessing step that normalizes unsupported values (e.g. stringify GEOGRAPHY) before toBeamRow.
Example fix
// before
Field f = Field.of("loc", FieldType.STRING); // BigQuery GEOGRAPHY arrives as non-string value
// after
// cast upstream: SELECT ST_AsText(loc) AS loc ...
Field f = Field.of("loc", FieldType.STRING); Defensive patterns
Strategy: try-catch
Validate before calling
// Java: pre-check unsupported BigQuery type/value combos before conversion
Set<String> unsupported = Set.of("GEOGRAPHY", "JSON", "RANGE", "INTERVAL");
if (unsupported.contains(tableSchema.getFields().get(name).getType())) {
throw new IllegalArgumentException("Unsupported BigQuery type for field: " + name);
} Try / catch
try {
Row row = BigQueryUtils.toBeamRow(schema, tableRow);
} catch (UnsupportedOperationException e) {
// value/type combo unsupported: serialize raw value or dead-letter
} Prevention
- Check Beam release notes for newly supported BigQuery types before upgrading table schemas.
- CAST unsupported types (GEOGRAPHY, JSON) to STRING in the extraction query.
- Prefer auto-generated schemas (fromTableSchema) over hand-written FieldTypes for exotic types.
When it happens
Trigger: toBeamRow conversion where jsonBQValue's class does not match any branch of the conversion switch: e.g. a String/Number value with target FieldType DATETIME/NUMERIC without a converter, a Map whose FieldType has no row schema, or unsupported combinations like a List targeting BYTE.
Common situations: BigQuery types with no default Java mapping (GEOGRAPHY, JSON, NUMERIC/INTERVAL on older Beam versions, RANGE) arriving as raw JSON types; a Beam schema written for a different table version; custom logical types the converter does not know.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported type <elementType.getType()>
- Unknown BigQuery type: " + bqType
- Unknown Avro type: " + type.getType()
- input should be array, map, numeric or row
- ${fieldType}
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/c834b92c1f21fcee.
Report an issue: GitHub.