One Star

Want to load data from oracle to .CS V file with retaining data type.

Hi,
I have and requirement to load data from source data i.e Oracle to a .csv file and the DATA Type of the Oracle DB should be retained as i have an Date time field Datatype  in Oracle , which should match as Date time column in .csv file. i mean to say the format in the .csv file should match with source for my case in csv file it should have data format column in csv file.
Any leads and help will be much appreciated.
Thanks,
Neeraj
9 REPLIES
Twelve Stars

Re: Want to load data from oracle to .CS V file with retaining data type.

what the problem?
-----------
Fifteen Stars

Re: Want to load data from oracle to .CS V file with retaining data type.

Dates are stored as numbers in Oracle. The way you see them in your query analyser is just formatting. ALL data in a CSV is in a String format, but can be represented in any way you wish. 
Rilhia Solutions
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Problem is the date field in oracle when moved to a CSV file the date column is in string format or text format... i want to use pivot from other tabs to populate a report so, if it is string or text i have to do manually which kills time and want to avoid this manual work.
please suggest how this could be fixed to get the date format in the csv file rather than string or text. i am using talend routine to load data from Oracle to CSV file. 
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

i want it as a Date column in csv
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Hi,
As said by @rhall_2.0 all data in a csv file are represented as string.
It's your responsability to format these data according to what you expect.
For example, exponential representation for numbers, and so on.
How do expect the date format?
Regards,
TRF
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Is there no way to send as Date format in csv or excel through Talend.
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Into Excel you can define a column as date datatype.
Into CSV, data are stored as strings - however, tell us the representation you expect in this case.
Of course you can convert a date to its string representation and decide the format.
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Hi Neeraj,
CSV files are not capable of having datatype defined. I guess you want it to be like how it is in database or excel. But defining datatype in CSV is just not possible. For example when you open a csv in notepad you will not see anything like datatype as you see in database. However all the tool which provide import csv has option for user to define datatype for each column. Like if you import csv into excel, excel will ask you in wizard to define datatype of each column.
Hope this help.
Thanks,
Anupam
One Star

Re: Want to load data from oracle to .CS V file with retaining data type.

Thanks Anupam for clarification, Can you please help me getting the column in date format in excel while loading data from Oracle... please help with some screen shots as when i try doing it it just gives absurd character