
Anonymous
Not applicable
2013-03-01
12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load DATE type into an Oracle TIMESTAMP column
Hi,
I need to load a DATE field with millisecond ("yyyy-MM-dd HH:mm:ss.zzz") into an oracle table.
but unfortunately, oracle needs TIMESTAMP datatype in order to manage the milliseconds.
When I run my job, I receive the following exception:
"ORA-01858: a non-numeric character was found where a numeric was expected"
How to match the talend DATE with oracle TIMESTAMP?
Thanks in advance,
Regards,
michelangelo
I need to load a DATE field with millisecond ("yyyy-MM-dd HH:mm:ss.zzz") into an oracle table.
but unfortunately, oracle needs TIMESTAMP datatype in order to manage the milliseconds.
When I run my job, I receive the following exception:
"ORA-01858: a non-numeric character was found where a numeric was expected"
How to match the talend DATE with oracle TIMESTAMP?
Thanks in advance,
Regards,
michelangelo
1,310 Views
- « Previous Replies
- Next Replies »
21 Replies

Anonymous
Not applicable
2013-03-01
01:12 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
zzz is the time zone. Use SSS as in HH:mm:ss.SSS instead.
795 Views

Anonymous
Not applicable
2013-03-02
03:44 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi michelangelo,
You can review all the date format by pressing ctrl+space from "Edit Schema" option
See the pic.
Hope it will help you for the further job.
Best regards
Sabrina
You can review all the date format by pressing ctrl+space from "Edit Schema" option
See the pic.
Hope it will help you for the further job.
Best regards
Sabrina
795 Views

Anonymous
Not applicable
2013-03-04
04:54 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina and uInfinity,
Thanks for your support.
I changed the Date pattern on the tMap before the tOracleOutput, but unfortunately I still have the same error.
The result is that records are loaded on the db table but the milliseconds are set to zero: ",0000".
Please, see the pictures posted.
Regards,
michelangelo
Thanks for your support.
I changed the Date pattern on the tMap before the tOracleOutput, but unfortunately I still have the same error.
The result is that records are loaded on the db table but the milliseconds are set to zero: ",0000".
Please, see the pictures posted.
Regards,
michelangelo
795 Views

Anonymous
Not applicable
2013-03-04
05:12 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please elaborate your case with an example with input and expected output values? I will make a testing for it.
Best regards
Sabrina
Could you please elaborate your case with an example with input and expected output values? I will make a testing for it.
Best regards
Sabrina
795 Views

Anonymous
Not applicable
2013-03-04
05:43 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
here is an example:
I have a tfileInputDelimited module that must read a csv file like this:
2013-02-28 11:48:20.456,AAA,172.20.0.31,BBB,monitoring,SUCCESS
in the input schema, the first field is a DATE with pattern: "yyyy-MM-dd HH:mm:ss.SSS"; other fields are STRING.
The output must be sent to an oracle table (tOracleOutput) with the following columns:
field datatype
STARTDATE TIMESTAMP(4)
NAME VARCHAR(20)
IPADDRESS VARCHAR(20)
CITY VARCHAR(20)
MODE VARCHAR(20)
RESULT VARCHAR(20)
the record on the table must be exactly in the same format of the input record.
Let me know if you need any further explanation.
Thank you so much for your support.
Regards
Michelangelo
here is an example:
I have a tfileInputDelimited module that must read a csv file like this:
2013-02-28 11:48:20.456,AAA,172.20.0.31,BBB,monitoring,SUCCESS
in the input schema, the first field is a DATE with pattern: "yyyy-MM-dd HH:mm:ss.SSS"; other fields are STRING.
The output must be sent to an oracle table (tOracleOutput) with the following columns:
field datatype
STARTDATE TIMESTAMP(4)
NAME VARCHAR(20)
IPADDRESS VARCHAR(20)
CITY VARCHAR(20)
MODE VARCHAR(20)
RESULT VARCHAR(20)
the record on the table must be exactly in the same format of the input record.
Let me know if you need any further explanation.
Thank you so much for your support.
Regards
Michelangelo
795 Views

Anonymous
Not applicable
2013-03-04
10:03 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
Configuring a basic flow with a tFileInputDelimited and a tOracleInput, the oracle error disappear, but on the DB table, the milliseconds are still set to zero.
Es:
input file: 2013:03:04 12:34:02,5678 (set as DATE on talend schema)
DB TABLE: 2013:03:04 12:34:02,0000 (set as TIMESTAMP on oracle)
regards,
michelangelo
Configuring a basic flow with a tFileInputDelimited and a tOracleInput, the oracle error disappear, but on the DB table, the milliseconds are still set to zero.
Es:
input file: 2013:03:04 12:34:02,5678 (set as DATE on talend schema)
DB TABLE: 2013:03:04 12:34:02,0000 (set as TIMESTAMP on oracle)
regards,
michelangelo
795 Views

Anonymous
Not applicable
2013-03-04
11:07 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi michelangelo,
The Date Pattern is "yyyy-MM-dd HH:mm:ss.SSS" and the range of .SSS is 000~999, which means your input source should be 2013:03:04 12:34:02.567
See my pic
Best regards
Sabrina
Es:
input file: 2013:03:04 12:34:02,5678 (set as DATE on talend schema)
DB TABLE: 2013:03:04 12:34:02,0000 (set as TIMESTAMP on oracle)
The Date Pattern is "yyyy-MM-dd HH:mm:ss.SSS" and the range of .SSS is 000~999, which means your input source should be 2013:03:04 12:34:02.567
See my pic
Best regards
Sabrina
795 Views

Anonymous
Not applicable
2013-03-05
04:02 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
I'm sorry but I still have this strange problem.
Please, look at my pic for the test flow:
FLOW 1) read from a file, print on the screen with tLogRow and write on the oracle table
As you can see, the millisecond are correctly printed by the tLogRow on screen: 2013-02-28 11:50:20.456
but looking on my oracle table, the milliseconds are missing: 2013-02-28 11:50:20.000
FLOW 2) read from the oracle table and print on the screen with tLogRow
Reading the record on the table, we can confirm that milliseconds are missing on the DB.
I cannot understand where is the issue... maybe it will have a very simple explanation, but I'm going crazy 😉
Thanks for your support Sabrina!
Regard,
michelangelo
I'm sorry but I still have this strange problem.
Please, look at my pic for the test flow:
FLOW 1) read from a file, print on the screen with tLogRow and write on the oracle table
As you can see, the millisecond are correctly printed by the tLogRow on screen: 2013-02-28 11:50:20.456
but looking on my oracle table, the milliseconds are missing: 2013-02-28 11:50:20.000
FLOW 2) read from the oracle table and print on the screen with tLogRow
Reading the record on the table, we can confirm that milliseconds are missing on the DB.
I cannot understand where is the issue... maybe it will have a very simple explanation, but I'm going crazy 😉
Thanks for your support Sabrina!
Regard,
michelangelo
795 Views

Anonymous
Not applicable
2013-03-05
05:48 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
look at this url
https://jira.talendforge.org/browse/TDI-24412?page=com.atlassian.jira.plugin.system.issuetabpanels%3...
it seems to be a known bug...
I used a tJavaFlex instead of the tOracleOutput with the same Java code
I made the needed changes proposed
and now it works! I have the milliseconds on the DB table.
The question is:
Is it the only solution? or can I still use the tOracleOutput with some specific configuration?
regards,
Michelangelo
look at this url
https://jira.talendforge.org/browse/TDI-24412?page=com.atlassian.jira.plugin.system.issuetabpanels%3...
it seems to be a known bug...
I used a tJavaFlex instead of the tOracleOutput with the same Java code
I made the needed changes proposed
and now it works! I have the milliseconds on the DB table.
The question is:
Is it the only solution? or can I still use the tOracleOutput with some specific configuration?
regards,
Michelangelo
795 Views

- « Previous Replies
- Next Replies »