Problem in reading the Excel data with sequential 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
Sridhar Sivakoti
Participant
Posts: 35
Joined: Tue Feb 13, 2007 5:30 am

Problem in reading the Excel data with sequential file

Post by Sridhar Sivakoti »

Hi,

When I am reading the data from Excel sheet by using sequential file stage I am getting the below error
Delimiter for field DB_Office not found

Please let me know what should be the Record level final delimiter, Field Delimiter and Quote values.

Regrds
Sri
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You are probably reading a .csv file, not an excel spreadsheet. could you post a sample line or three?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Where is the source file?

Can you view it using vi ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ArndW wrote:You are probably reading a .csv file, not an excel spreadsheet. could you post a sample line or three?
I wager 400 Quatloos on it being a .xls file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That's a lot of Quatloos, back in the day I could get a thrall for a mere 2000Qt's . I think I'll not wager on this one...
Sridhar Sivakoti
Participant
Posts: 35
Joined: Tue Feb 13, 2007 5:30 am

Problem in reading the Excel data with sequential file

Post by Sridhar Sivakoti »

I am reading the Excel file which is in Datastage server(Unix box), at present I am not having the this Unix access, but the same excel sheet I am having on my desktop.

Please let me know if you need any other information.

Regards
Sri
stefanfrost1
Premium Member
Premium Member
Posts: 99
Joined: Mon Sep 03, 2007 7:49 am
Location: Stockholm, Sweden

Post by stefanfrost1 »

If it is indeed a csv or skv or any -separated file, then your problem probably is on the last or second last column if the last column is empty. Some versions of Excel seems to export data skipping empty fields at the end. This means that datastage will find an early end marker and skip or reject that record due to error in import. This can be fixed by having space at empty columns in excel or having a better export utility for excel or using column importer in datastage and reading all columns from the file as one big column, later parsing it and allowing nulls in your new imported column.
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: You need to clarify if this is a native xls file or one you've saved as a csv or prn or some other delimited format first.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try setting Final Delimiter = End
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: Problem in reading the Excel data with sequential file

Post by ArndW »

Sridhar Sivakoti wrote:I am reading the Excel file which is in Datastage server(Unix box)...
As has been asked several times before - what format is this file in? If native Excel format then you cannot read it directly. You might be able to find a free ODBC UNIX driver (or buy ConnectDirect) and then use the ODBC connectivity inside DataStage to read the file.
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Hi,

You can use free jars (java executables) like jxl.jar to read excel from unix

Regards
Sreeni
Post Reply