nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakesh <rakesh999.a...@gmail.com>
Subject Re: Cannot convert to timestamp error using putsql processor NiFi 1.3.0
Date Tue, 17 Oct 2017 07:05:00 GMT
Hi Juan,

Thanks a lot.............

I corrected my format like "*${sql.args.27.value:toDate("EEE MMM dd HH:mm:ss
z yyyy"):toNumber():format("yyyy-MM-dd HH:mm:ss.SSS")}*" and It worked
perfect.


Now timestamp error gone and able to update table. Here is one more
challenge for me, I have 'n' number of tables each table having datetime
columns in different positions say for example table-n has column 10 as
datatype datetime. To convert that particular column to timestamp i'll use  
*${sql.args.10.value:toDate("EEE MMM dd HH:mm:ss z
yyyy"):toNumber():format("yyyy-MM-dd HH:mm:ss.SSS")} * expression in update
attribute property. Basically I want to avoid hardcoded values and update
attribute should pick datetime columns and update according to my format.
For this I'm referring 
https://stackoverflow.com/questions/45685703/nifi-putsql-timestamp-datetime-error-cannot-be-converted-error
<https://stackoverflow.com/questions/45685703/nifi-putsql-timestamp-datetime-error-cannot-be-converted-error>
 
this answer there is no clue where he has defined 'n' value I tried with
that unfortunately it did't work for me any suggestion on this.......



Thanks
rakesh.



--
Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/

Mime
View raw message