Need to extract Excel file...

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Need to extract Excel file...

Post by swades »

Hi Friends.
I have to load one excel file to Teradata DB.
But there is lots of white space in that file -row as well as in column,so need to remove.
and we dont have time to make macros for that.
so plz tell me better way to do it.
ok thanks .
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Welcome Aboard :P
Save it as a CSV file or a tab delimited text file. Read it with a sequential file stage and load it to the database. Pass it via a transformer stage and use trim to trim the leading and trailing white spaces. Make sure you specify the columns as varchar.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Welcome Aboard ! :)

Well! You can read the excel file and strip the white spaces while transforming. ;)
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Welcome Aboard :D

How do you plan to read the Excel file through datastage?
You have a ODBC driver for Excel on Unix to read from the Excel file?

If I had to do it, I would convert the Excel file to a csv file first and then go forward from there.
It's much easiers that way
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Wow!
Three welcomes, swades - you are most welcomed newcomer! :wink:
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Need to extract Excel file...

Post by ray.wurlod »

swades wrote:and we dont have time to make macros for that.
Make time.

Why is it there's never time to do it right, but always time to do it again?

It will require the same amount of work no matter which way you do it - DataStage is not a magic bullet.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply