BigQueryAvro

Scio provides support for converting Avro schemas to BigQuery TableSchemas and Avro SpecificRecords to a BigQuery TableRows.

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)