Re: Programmatically building a nested schema

2018-04-09 Thread Bryan Bende
Add a RecordField to the RecordSchema where the DataType is a
RecordDataType... a RecordDataType then has a child schema.

May be helpful to look at the code that converts between RecordSceham
and Avro schemas:

https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java#L195-L205

On Sun, Apr 8, 2018 at 6:05 PM, Mike Thomsen  wrote:
> Can someone tell me how to build a nested schema using RecordSchema and
> RecordField objects? The use case here is to make MongoDBLookupService able
> to roughly detect the schema from the returned bson Document.
>
> Thanks,
>
> Mike


Programmatically building a nested schema

2018-04-08 Thread Mike Thomsen
Can someone tell me how to build a nested schema using RecordSchema and
RecordField objects? The use case here is to make MongoDBLookupService able
to roughly detect the schema from the returned bson Document.

Thanks,

Mike