As part of NIFI-2591 and https://github.com/apache/nifi/pull/883 I've been 
looking at adding Binary data support to PutSQL, which until now has not 
supported binary data types at all.

After submitting the PR a discussion arose around supporting more than one 
style of binary encoding.  Currently my code only supports the binary encoding 
format provided by Avro.  A suggestion was made to provide hex binary encoding, 
but there is no way to know for certain that an Avro encoded binary string is 
not a hex string or visa-versa.

I have proposed adding a new optional attribute to FlowFiles routed to PutSQL 
called sql.args.N.format.  By default PutSQL would assume that binary data was 
encoded using the single byte format Avro uses, but a user could provide a 
format option, ex. `hex`, that would allow the code to use an alternate 
encoding option.

Thoughts?

Regards,
  Peter

Reply via email to