Converting from Avro schema to Google BigQuery schema in python?
Asked Answered
C

0

7

Is there a python library that converts Avro schemas to BigQuery schemas?

I noticed that the Java SDK for Apache Beam has a utility that converts from Avro to BigQuery. However, the python SDK for Apache Beam only maps in the other direction, mapping BigQuery to Avro.

Am I missing it? Does the python Beam SDK map from Avro to BigQuery? Or is there another library out there that does that?

Cementum answered 17/8, 2020 at 16:27 Comment(5)
What do you mean with convert Avro to BQ? You mean writing an AVRO file to a BigQuery table?Clamper
I actually mean converting an avro schema to a bigquery schema, independent of any records. Our use case involves streaming avro with changing schemas and BigQuery's schema autodetection wasn't able to handle that. I wound up having to write code to this myself.Cementum
@Xiphias were you able to create bq schema using a Avro schema. i could use any reference if possible.Whitted
I was - unfortunately I had to write the code myself. I am not sure if I can disclose it given that it was done for my work.Cementum
I ran into this package after checking your question (for future readers): pypi.org/project/avro-to-bigqueryCounterplot

© 2022 - 2024 — McMap. All rights reserved.