You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (JIRA)" <ji...@apache.org> on 2017/03/17 16:48:41 UTC

[jira] [Commented] (NIFI-3610) PutSql truncates data after 80 characters

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

Matt Burgess commented on NIFI-3610:
------------------------------------

What kind of database (MySQL, Oracle, e.g.) are you connecting to, and what version of the driver are you using? The code executes Statement.setString(), for which the documentation says "The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database."

If you're using MySQL, try adding "&jdbcCompliantTruncation=false" to the URL (source: https://bugs.mysql.com/bug.php?id=43055)

> PutSql truncates data after 80 characters
> -----------------------------------------
>
>                 Key: NIFI-3610
>                 URL: https://issues.apache.org/jira/browse/NIFI-3610
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.1.1
>         Environment: Fedora 25
>            Reporter: Uwe Geercken
>
> I have a ConvertJsonToSQL processor with following attribute:
> sql.args.4.value
> Type: flights, Station: hel, Month offset: -1, Environment: dev hello uwe what are you doing here
> the sql.args.4.type is: -1 (LONGVARCHAR)
> This processor is connected to a PutSQL processor. The same attribute looks like this:
> sql.args.4.value
> Type: flights, Station: hel, Month offset: -1, Environment: dev hello uwe what a
> The data is truncated after 80 characters and arrives like this in the database. I have checked the database - it allows up to 255 characters.
> The insert query from PutSQL - just for the completeness - is: 
> INSERT INTO process_monitoring (process_name, process_name_monitoring, last_runtime_automatic, parameters) VALUES (?, ?, ?, ?). And the record does get inserted - but column "parameters" is truncated to 80 characters.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)