[ 
https://issues.apache.org/jira/browse/NIFI-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427443#comment-15427443
 ] 

ASF GitHub Bot commented on NIFI-2591:
--------------------------------------

Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/883
  
    A complex problem for sure. Certainly you are right with the Jira that 
Binary types are currently not supported, and if the use case you describe 
(coming from Avro) is the most common, then this is clearly an improvement :)  
Perhaps we could add this improvement and then write a Jira to handle the 
general case. Checking for a prefix is a decent approach but nothing will be 
bulletproof, such is the nature of being able to describe the type of the data 
vs being able to represent it when it must exist as a String (for attribute 
values). The workaround for byte literals in the interim could be to put them 
directly in the SQL statement (instead of attribute values).


> PutSQL has no handling for Binary data types
> --------------------------------------------
>
>                 Key: NIFI-2591
>                 URL: https://issues.apache.org/jira/browse/NIFI-2591
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Peter Wicks
>
> PutSQL does not call out binary types for any special treatment, so they end 
> up being routed through stmt.setObject.
> The problem is that upstream processors have formatted the binary data as a 
> string and the JDBC driver doesn't know what to do with a string going into a 
> binary field.
> Investigation into the AvroToJSON processor shows that if users are trying to 
> load data exported from a source system as Avro Binary that Avro encodes the 
> binary data into ASCII (One byte per character).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to