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

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

Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/883
  
    That part makes sense, but what about when I put three emoticons in the 
UpdateAttribute processor to set the value, then I get three bytes in the 
table, all value 63. I would've expected 6 bytes, two per smiley as a Unicode 
or UTF-16 value. I'll check the flow file to see if that's being done before 
PutSQL.
    Mostly I was testing other ways of getting binary data into the processor 
vs Avro, I don't have an Avro file with binary data in it. I'll create one and 
take it through the paces. Also I wonder what happens when you have binary data 
as the payload of a flow file and want to use that in PutSQL, using ExtractText 
to get it into an attribute.


> 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