How to populate both type and logical type for an avdl file

I have recently started using avdl and avro files.I am getting confused in how to populate two types for particular field

I have avdl file like this

@namespace("com.bettercoding.avro") protocol ExampleProtocol {   record CompanyRecord {     int day;//date_start     int countryCode;   } } 

WHile converting it into an .avsc file i get a result like below

{   "type" : "record",   "name" : "CompanyRecord",   "namespace" : "com.bettercoding.avro",   "fields" : [ {     "name" : "day",     "type" : "int"   }, {     "name" : "countryCode",     "type" : "int"   } ] } 

I want to achieve something like

{   "type" : "record",   "name" : "CompanyRecord",   "namespace" : "com.bettercoding.avro",   "fields" : [ {     "name" : "day",     "type" : "int"   }, {     "name" : "countryCode",     "type" : {type:"int","logicalType":"date"}   } ] }  

I read about logical types but i can not get anything where I can populate something like this.Please help

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.