Thanks, that's what I figured. I probably can't use InferAvroSchema because
this data is pretty tricky in terms of them suddenly deciding to change the
types.

On Thu, Aug 17, 2017 at 6:18 PM, Matt Burgess <[email protected]> wrote:

> 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 <[email protected]>
> 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
>

Reply via email to