Created 04-03-2017 05:16 PM
I have created data flow which will transfer SQL server data from DB to DB in nifi and there a datetime column and it also contains some null value in source table, now i want to transfer that column with datetime value and also null values same time to the datetime column in target table. I'm unable to find right expression to put it in update attributes processor.
I'm using below expression in update process:
sql.args.1.name : CR_LINE_CMTD_START_DT
sql.args.1.type : 93
sql.args.1.value :${CR_LINE_CMTD_START_DT:toDate("yyyy-MM-dd HH:mm:ss.SSS"):toNumber()}
Please help to fix this
Thanks sam
,
Hi I have created data flow which will transfer SQL server data from DB to DB in nifi and there a datetime column and it also contains some null value in source table, now i want to transfer that column with datetime value and also null values same time to the datetime column in target table. I'm unable to find right expression to put it in update attributes processor.
I'm using below expression in update process:
sql.args.1.name : CR_LINE_CMTD_START_DT
sql.args.1.type : 93
sql.args.1.value :${CR_LINE_CMTD_START_DT:toDate("yyyy-MM-dd HH:mm:ss.SSS"):toNumber()}
Please help to fix this
Thanks
sam
Created 04-21-2017 02:39 PM
@Ravi Teja did you try this ? it worked for me
${CR_LINE_CMTD_START_DT:toDate("yyyyMMddHHmmss"):format("yyyy-MM-dd HH:mm:ss")}
Created 04-21-2017 04:16 PM
Could you send a screenshot of your data flow to give us a better idea of what you have implemented? You may have to pull the field down as just a string, check for null in a RouteOnAttribute, and then modify the insert command to a date of your choosing or "" if you wish for it to remain null. For non-null you can format as needed and then direct both branches into a putsql processor to be inserted.
Created 08-10-2017 06:00 PM