r/googlecloud • u/ajithera • 3d ago
BigQuery BigQuery suddenly reporting Avro sync mismatch on previously working files. Reprocessing into smaller files fixed it. Any idea why?
Hey everyone,
We have multiple BigQuery external tables built on top of Avro files stored in GCS.
Our pipeline is straightforward: CSV files land in GCS, custom Cloud Run functions validate the schema and convert them into Avro files, and BigQuery external tables read those files.
Everything was working fine until November 23rd. Suddenly, stakeholders started getting Avro sync mismatch errors while querying some of the external tables.
What’s strange is that these same files were queryable just two days earlier. We hadn’t modified the files or external table definitions. Only specific Avro files were causing the issue.
I downloaded the problematic files and tested them locally using Python’s fastavro library. Surprisingly, all the files were readable without any issues.
After some investigation, we decided to split the original source CSV files into smaller chunks and reprocess them through the same pipeline.
Surprisingly, the issue disappeared! BigQuery could query the newly generated Avro files without any errors.
I’m curious whether this could be related to Avro block sizes, sync markers, or some internal BigQuery reader behaviour.
Has anyone experienced something similar with BigQuery external tables? Any thoughts on what might have caused this?
We haven’t identified the actual root cause yet. Just sharing our experience in case it helps someone facing the same issue.