ottlukas opened a new issue, #600:
URL: https://github.com/apache/plc4x/issues/600

   NIFI Flowfiles have 'automatic' attributes, that are there even if they 
aren't explicitly created by a flow processor.
   
   The PLC4x processors use all the attributes when writing, this is incorrect. 
 They will be writing the wrong things.
   
   The usual pattern in NIFI is to have the attribute name follow a pattern, 
that can be read as a prefix, such as :
   
   plc4x.address.
   
   Then the processor looks for any attributes that start with that, and get 
the end of the address to use as the field name.
   
   As is I would not think this processor would work in production.
   
   Example of this pattern in NIFI: 
   
https://github.com/apache/nifi/blob/7d20c03f89358a5d5c6db63e631013e1c4be4bc4/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L132
   
   This is slightly different, as the processor above is looking for configured 
values, where I believe that the plc4x processor just want to write anything 
with the attribute name value.
   
   This is doubly wrong, as attributes are kept in a map.  There will never be 
more than one named value.
   
   The proposed fix would be -\>
   
   - change the reads attribute to use a prefix pattern as  above
   - only write out those that match through regex / capture
   
   
   
   
   Imported from Jira 
[PLC4X-219](https://issues.apache.org/jira/browse/PLC4X-219). Original Jira may 
contain additional context.
   Reported by: otto.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to