0
votes

I need to create an empty table using avro schema file into Google's big query but fails to do so...

I have composed the following sample schema file

{
   "namespace": "tutorialspoint.com",
   "type": "record",
   "name": "emp",
   "fields": [
      {"name": "name", "type": "string"},
      {"name": "address", "type": "string"}
   ]
}

And the using BigQuery console fails to create a table with the following error:

Error while reading data, error message: The Apache Avro library failed to parse the header with the following error: Invalid data file. Magic does not match: /subrange//bigstore/bigquery-prod-upload-us

1

1 Answers

0
votes

BigQuery supports loading Avro files, as defined here. There's no formal definition of avro schema file and thus not supported in BigQuery. If you want to create an empty table in BigQuery with schema, you can use a BigQuery JSON schema file.