Closed mreid-moz closed 5 years ago
One idea to start is to programmatically insert the metadata section into the avro schema as a Map<String, String>
here:
A downside of this approach is the generated BigQuery schema in mps will be different by this new section. Additionally, once the map is converted into a repeated key-value struct in BigQuery, it'll likely be tricky to convert into a struct in the case of a table migration without a UDF.
One idea to start is to programmatically insert the metadata section into the avro schema as a Map<String, String>
Given the evolving conversation in the past few days, I'm feeling pretty confident that we have a way forward for defining the nested metadata structure in a JSON schema, and merging that in as part of generation of avro and bq schemas. So I think we can safely avoid taking the intermediate step of adding a metadata map to the avro schema.
Breaking out part of the discussion in #477: