Hi ,

What I mean when using a Schema.parse(), we can set the validation of names
to false, using setValidation method.

But using avrojob there is no option to set this validation to false.

I want this validation option to make the parser validation to false.so
that I can use it my code.


What am trying to achieve is I have a avro schema with sub structure with
name has operators separated by dot(.), which is not a valid one when
schema gets parsing. It will throw error.

But there is an option to set this name validation to false while parsing
by using new schema.Parser().setValidation(false);

But with the AvroJob no option to set validation. I needed this feature.

Thanks,
Sree


On Tue, 30 Jul, 2019, 14:11 Ryan Skraba, <r...@skraba.com> wrote:

> Hello!  I'm not sure I understand your question.  Some names are
> *required* with a specific format in the Avro specification
> (http://avro.apache.org/docs/1.8.2/spec.html#names)
>
> What are you looking to accomplish?  I can think of two scenarios that
> we've seen in the past: (1) anonymous records where the name has no
> interest, and (2) mapping a structure that supports arbitrary UTF-8
> names (like a database table) to a record with the same field names.
> Neither of those are supported in the Avro specification.
>
> For the first case (where we don't care about the record name), we
> just autogenerated a "safe" but unused record name.
>
> For the second case, we used a custom annotation on the field
> (something like "display.name") to contain the original value and
> generated a "safe" field name.
>
> In both cases, being safe means that it meets the Avro spec
> ([A-Za-z_][A-Za-z0-9_]*) and avoids collisions with other generated
> names.
>
> I hope this helps!  Ryan
>
> On Fri, Jul 26, 2019 at 1:52 PM SB M <manjusree1...@gmail.com> wrote:
> >
> > Hi All,
> >
> >  Problem: I need a option to set name validation for schema parsing,
> when setting with avrojob and avromultipleinputs.
> >
> > Is there any way to set schema name validation to false currently, when
> am ho through source code am not able to find any options like that.
> >
> > Please give a some solution.
> >
> > Regards,
> > Sree.
> >
>

Reply via email to