Closed IllyaYalovyy closed 12 years ago
@IllyaYalovyy You need to update the schema.literal or schema.url with the new schema via "ALTER TABLE table_name SET SERDEPROPERTIES ('schema.literal' = 'BLAH');" or, if you use schema.url either update what the url is pointing to, or update to a new url.
Thanks, Illya
Ah, for newly added fields you have to add a default value in the schema that old records return: http://avro.apache.org/docs/1.5.4/spec.html under complex types/records.
@IllyaYalovyy Did using a default work for you?
Jakob,
I run a lot of tests yesterday and it worked like a charm. Thanks a lot for your support.
Here is my final schema: { "namespace":"com.expedia.edw.gco.navigator", "name":"item", "type":"record", "fields":[ {"name":"a","type":["null","string"]}, {"name":"a1","type":["null","string"], "default":null}, {"name":"b","type":["null","int"]}, {"name":"b1","type":["null","int"], "default":null}, {"name":"c", "type": {"type":"record", "name":"c_t", "fields":[{"name":"col1","type":["null","string"]}]}}, {"name":"c1", "type": {"type":"record", "name":"c1_t", "fields":[{"name":"col1","type":["null","string"], "default":null}]}, "default":null}, {"name":"d", "type":{"type":"array", "items":{"type":"record", "name":"da_t", "fields":[{"name":"col1","type":["null","string"], "default":null}]}}, "default":null} ] }
Environment: CDH3U3, avro-1.5.4 and avro-mapred-1.5.4, haivvreo-1.0.7