Hi All,
We have source as Excel format and i converted the source excel file to test.csv format and tried to open the file and iam getting the following error
test..Sequential_File_10.DSLink11: nls_read_delimited() - row 1, too many columns in record
and then i supressed row truncation warnings by ckecking but i can see the metadata which is not in redable format.
Can i know how to slove this problem.
Thanks in advance
Actually there is a miss match between the number of columns within the csv file that you are using and the metadata of the sequential file stage that is used for running the csv file. Check whether the number of columns are same or not and check whether there is any possibility of having delimiters within the data of the csv file like an occurence of " within any of the columns data.
Success consists of getting up just one more time than you fall.
Hi loveojha2 ,
The number of columns remains same in the meta data of sequential file definition and the csv file.The csv file do not have any of " such delimiters.
When i try to open the csv file through sequential file stage I can see the meta data in un readable format.
Can you suggest some alternative or your way approach towards reading data from CSV files.
Thanks in advance
What do you mean when you say that metadata is in unreadable format? Could you elaborate on it. Also, if you can post a sample row from your .csv file it would be of more help. I'll take a shot in the dark. Assuming that your data in the .csv file is not quoted, suppress the quote character in the Sequential File stage i.e. set Quote character value to 000 and let us know if that works.
Maybe you are getting a comma in your data itself. Thats why the csv file is complaining for the extra column. Also, what exactly do you mean by meta data is not readable. How can you read the metadata from the file. Do you mean, while importing the metadata from the csv file your having problems, or its acting wierd. Need clarification.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Ensure that you have the Line Termination radio button set to DOS Style (CR LF).
If you have it set to UNIX Style, the file itself will have a line terminator of (x0D0A) but DS is expecting (X0A). DS thinks the (x0D) is an extra column.
Open your csv file in a non xls editor like notepad, are you able to see your data properly there, somthing like:
dhkas,dfghkd,fjshjdks
sdhsj,sdhjs,dsjds
Success consists of getting up just one more time than you fall.
vijayindukuri wrote:We have source as Excel format and i converted the source excel file to test.csv format
Ok, based on the garbage you are seeing, let's not make any assumptions here. Please explain how you 'converted' the excel file. Also, what does the .csv file look like if you open it in something simple like Notepad?
-craig
"You can never have too many knives" -- Logan Nine Fingers
woooo, thats martian language . Ok sorry guys, just messing in the morning.
Something seriously went wrong while converting it into a csv file.
Do this, dont save it in csv, save it in a tab delimited format, you have that option for xls files. In the sequential file stage, specify 007 in the delimiter box. See if that works.
Forget datastage, did you try opening the csv file just by double clicking on it. What do you see?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
yea sorry, i knew i was off there, but was too lazy to open my job and look it up. Thanks Craig.
James huh...
I need to stop putting names in my quotes
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DS guru:
Forget datastage, did you try opening the csv file just by double clicking on it. What do you see?
After renaming the file i tried to view the file by double cliking that,I was able to see that data in csv format.
The problem comes when i try to see that from sequential file stage's view data.