You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Li, Peng" <pe...@hpe.com> on 2016/09/03 20:28:38 UTC

PutSQL error sql.arg3.value cannot convert to timestamp

Hi NIFI expect,

During my play with NIFI, I got an issue by using PutSQL with the message "...sql.arg3.value cannot convert to timestamp... ".
The flow looks like:
[cid:image001.png@01D20630.EACBFE40]
What plan to do is : run sql select from table A and insert the sql-results again into another DB table B as backup. Table B has exactly the same definition as table A.
The output JSON file (through PutFile) shows the correct content with DATE output like  "2016-04-29 00:00:00.0". But the PutSQL Processor at the end failed with the error given above.

Do I forget something by setting or is it an internal bug? NIFI 1.0.0 and Oracle 11gR2 are used.

Thank you!

Best regards
Peng





Re: PutSQL error sql.arg3.value cannot convert to timestamp

Posted by Bryan Bende <bb...@gmail.com>.
Hello,

PutSQL should be able to accept a long as an epoch timestamp, or a string
with the format yyyy-MM-dd HH:mm:ss.SSS

I'm wondering if its the precision on the milliseconds, in your example
there is one zero, but the date format has three digits.

Also, how are you producing the flow files going into PutSQL? are you
converting the Avro from table A to JSON, then ConvertJSONToSQL?

Thanks,

Bryan



On Sat, Sep 3, 2016 at 4:28 PM, Li, Peng <pe...@hpe.com> wrote:

> Hi NIFI expect,
>
>
>
> During my play with NIFI, I got an issue by using PutSQL with the message
> “…sql.arg3.value cannot convert to timestamp… ”.
>
> The flow looks like:
>
> What plan to do is : run sql select from table A and insert the
> sql-results again into another DB table B as backup. Table B has exactly
> the same definition as table A.
>
> The output JSON file (through PutFile) shows the correct content with DATE
> output like  "2016-04-29 00:00:00.0". But the PutSQL Processor at the end
> failed with the error given above.
>
>
>
> Do I forget something by setting or is it an internal bug? NIFI 1.0.0 and
> Oracle 11gR2 are used.
>
>
>
> Thank you!
>
>
>
> Best regards
>
> Peng
>
>
>
>
>
>
>
>
>