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

    https://github.com/apache/nifi/pull/1877#discussion_r124031794
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaAccessStrategy.java
 ---
    @@ -38,4 +40,11 @@
          * @return the set of all Schema Fields that are supplied by the 
RecordSchema that is returned from {@link #getSchema(FlowFile, InputStream)}.
          */
         Set<SchemaField> getSuppliedSchemaFields();
    +
    +    /**
    +     * @return Whether this factory needs an incoming FlowFile to resolve 
Record Schema.
    +     */
    +    default boolean isFlowFileRequired() {
    --- End diff --
    
    @ijokarumawak I very much agree with the idea behind this JIRA. However, I 
think I would approach the solution in a somewhat different manner. Rather than 
having a boolean indicate whether or not a FlowFile is required, I would 
recommend we get rid of the FlowFile being passed in to get the schema and 
instead just pass in a Map<String, String>. This way, if you have no FlowFile 
you can just pass in an empty Map. It also allows for more flexibility so that 
you can pass in a Map<String, String> where the schema.name may be set by the 
processor, for instance, instead of an empty Map.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to