Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm new to Talend I have no idea about datetime to timestamp conversion I tried changing date pattern in expression column for the target table in tmap, no error and migration worked fine but then no date value stored in the new column for date (because it's a timestamp db type) it's all null, is there any way I can do to solve this?
Thanks!
What's the DB engine?
Can you share the expression you're using with a sample of input data?
Oracle as target and Informix as input.
dtcreatedate (datetime) -> i'm just using row1.dtcreatedate in the expression column for createdate (timestamp). I tried turning the datetime values into string and parse it into date format again but nothing works and createdate (timestamp) in oracle db is still null.
I think you need to show us screenshots of your job and your component configurations for the components which are using/manipulating this date.
input schema:
output schema:
im also not really good with Java so i cant write the exact expression for timestamp conversion, so I just simply map it like this for the date column and it didnt store anything.
ETA: for example data from input column is 2018-07-10 16:46:33 and it wasnt inserted into target column, just null value.
Can you remove your target DB component and replace it with a tLogRow. Then run the job and let us know what you get?
i've tried that before, on tLogRow i could see the date values but it didnt work when i connected tmap to the target db i think it's because oracle db has timestamp and it rejects datetime value?
You are actually converting from a Java Date object to an Oracle Timestamp, so it is not to do with Datetime to Timestamp. If you are seeing dates output by the tLogRow, it means the Date is available in the job. Are you getting any errors in the job and did you build it or inherit it from someone else? The reason i ask is that you can configure db components to omit to insert values. If you have no error and you didn't create this job, I suspect the original developer has chosen not to insert the date values. Can you post a screenshot of the job as well?
this is the job:
I'm just working on the data migration I created the db but I wasn't the one who designed it, that also means I can't change db components to have all the values stored without informing the original developer. And i didn't get any error after running a job it's just that the date value can't be stored to the target db. Is there any way to convert java date object to oracle timestamp?
Can you go to the advanced settings of your DB component (output) and show us what you have there. My suspicion is that your problem may be caused by the field options section