nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Burgess <mattyb...@gmail.com>
Subject Re: Defaulting to string for dirty data w/ Avro
Date Thu, 17 Aug 2017 22:18:54 GMT
Mike,

String is usually the safe bet, InferAvroSchema and ExecuteSQL default to String if they can't
figure out what type to use.

Regards,
Matt


> On Aug 17, 2017, at 6:00 PM, Mike Thomsen <mikerthomsen@gmail.com> wrote:
> 
> Is it safe to choose "string" as a default type with Avro? I'm trudging through some
really dirty data right now and that seems to behave fine when I I do something like this:
> 
> Flowfile content:
> 
> {
>     "x": 1
> }
> 
> Avro field definition:
> 
> { "name": "x", "type": ["null", "string"] }
> 
> Where sometimes X is an int and others it's a string (don't ask me why, I didn't set
up ETL on this data).
> 
> I did a simple flow that did just this and it **seemed** to work great, but I thought
I'd get a second opinion before spending my client's time building something big around it.
> 
> Thanks,
> 
> Mike

Mime
View raw message