avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lappo <peter.la...@gmail.com>
Subject Re: custom attributes
Date Thu, 07 Jan 2016 00:16:19 GMT
Yes you can but be careful with the trailing comma - avro parser is quite strict and will fail

> "ValidityOption": "Delete",

I use 
{"name":"CUST_ID","type":"string","primarykey":"true”}
and define the custom attribute in the avsc file


> On 6 Jan 2016, at 21:11, John Smith <lenovomi@gmail.com> wrote:
> 
> Hello,
> 
> Im wondering if its allowed to define custom attributes as part of the AVRO schema, e.g.
> 
> 
> {
>         "type" :"record",
>         "name": "Test",
>         "fields": [ 
>             {
>             "name": "ROW_ID",
>             "title": "row identifier ",
>             "type": "integer",
>             "description": "something",,
>             "ValidityDate": "2015-01-01",
>             "ValidityOption": "Delete",
>             },
> ...
> 
> 
> Can I define those three new attributes description, ValidityDate, ValidityOption that
extends description of the record "ROW_ID"?
> 
> 
> Thank you
> 
> 


Mime
View raw message