BigQueryAvro
Scio provides support for converting Avro schemas to BigQuery TableSchema
s and Avro SpecificRecord
s to a BigQuery TableRow
s.
import com.spotify.scio.extra.bigquery.AvroConverters
import org.apache.avro.specific.SpecificRecord
import com.google.api.services.bigquery.model.{TableFieldSchema, TableSchema, TableRow}
val myAvroInstance: SpecificRecord = ???
val bqSchema: TableSchema = AvroConverters.toTableSchema(myAvroInstance.getSchema)
val bqRow: TableRow = AvroConverters.toTableRow(myAvroInstance)
0.14.8-23-c45685a-20241105T161920Z*