Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2619#discussion_r193733115
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaAccessUtils.java
 ---
    @@ -176,6 +176,8 @@ public static SchemaAccessStrategy 
getSchemaAccessStrategy(final String allowabl
                 return new 
HortonworksAttributeSchemaReferenceStrategy(schemaRegistry);
             } else if 
(allowableValue.equalsIgnoreCase(CONFLUENT_ENCODED_SCHEMA.getValue())) {
                 return new ConfluentSchemaRegistryStrategy(schemaRegistry);
    +        } else if 
(allowableValue.equalsIgnoreCase(INFER_SCHEMA.getValue())) {
    --- End diff --
    
    Since this inference only works when the content is JSON, I think this 
option should only be available when using a JSON related record reader, and 
not available in the default case. 
    
    This would be similar to how the AvroReader makes available the option for 
"Embedded Avro Schema" - 
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroReader.java#L63
    



---

Reply via email to