Support Questions
Find answers, ask questions, and share your expertise

Issue with dates in Hive

Hello my friends,

I'm trying to push data to Hive using Nifi (PutHiveStreaming processor), but I'm having some trouble converting date types here. I have another processor working with Kafka, and they're using the same AvroSchemaRegistry, which looks like this (only the date types) :

{ "name" : "BusinessDate", "type" : [ "null", { "type" : "int", "logicalType": "date" } ] }

In Kafka, it works beautifully, but for some reason the result in Hive is this:



My BusinessDate field in Hive is of type "string". I've tried changing it to "date", but then it just saves it as null.

My AvroSchemaWriter looks like this:

Schema Write Strategy
Embed Avro Schema

Schema Access Strategy
Use 'Schema Name' Property

Schema Registry
AvroSchemaRegistry (all transactions)

Schema Name

Schema Text

Compression Format

Do you have any ideas on how to fix this?

Thanks a lot!