David,

Avro supports a logical type of "timestamp-millis" only for a long field, not 
for a String field.
So I think you'd need to use:

{"name": "activationDate", "type": { "type":"long", 
"logicalType":"timestamp-millis"} }

Thanks
-Mark

On Jun 6, 2019, at 11:21 AM, David Gallagher 
<[email protected]<mailto:[email protected]>> wrote:

Hi – I’ve got an incoming JSON message with a timestamp that I want to 
validate. I have a ValidateRecord (1.8.0) processor set up with a 
JSONPathReader for the message. The relevant field is defined in the schema as:

{"name": "activationDate", "type": { "type":"string", 
"logicalType":"timestamp-millis"} }

And in the JSONPathReader service, I have the timestamp format defined as:

MM/dd/yyyy HH:mm:ss'Z'

As that is our intended format. However, even with strict type checking turned 
on, the validator will validate a timestamp of “2019-30-06<tel:2019-30-06> 
15:02:39Z". In fact, it seems as though it will validate / pass on absolutely 
any string in that field. Is there a way to make the validation work?

Thanks,

Dave

Reply via email to