When loading data to BigQuery with a JSON column, it fails when the actual data is a Json array [ data1, data2 ]:
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `com.google.api.services.bigquery.model.TableRow` from Array value (token `JsonToken.START_ARRAY`)
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1767)
com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1541)
com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromArray(StdDeserializer.java:222)
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:457)
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:32)
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4917)
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3860)
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3828)
com.spotify.scio.bigquery.types.package$Json$.parse(package.scala:76)
@BigQueryType.toTable <== line where there is the toTable annotation
It did work with JacksonNode, but I wonder if it is possible with TableRow.
When loading data to BigQuery with a JSON column, it fails when the actual data is a Json array
[ data1, data2 ]:It did work with
JacksonNode, but I wonder if it is possible withTableRow.