Page 1 of 1

Retrieval of data from a file

Posted: Thu Jan 01, 2009 11:24 pm
by Abhyankar
Hi,
I have a file. It has lot of columns. However, some columns are together without any space in between them and some have space. For eg:

0000492007-02-28 1020001 1 5066 0.4

000049 is first column
2007-02-28 is second
1020001 is third.

What property do i need to set in my sequential stage to get the same?

Posted: Thu Jan 01, 2009 11:55 pm
by chulett
That would be a "fixed width" file. In other words, there are no field delimiters and any reader program has to know the length of each field to know where any given one starts and stops.

Posted: Thu Jan 01, 2009 11:56 pm
by ray.wurlod
Welcome aboard.

You need to set the format property that indicates that the record format is fixed width. For each column you need to specify the display width (which is the number of characters in the record that represent that particular field).

Posted: Fri Jan 02, 2009 12:43 am
by Abhyankar
Hi,
Thanks for your reply. I am not a Premiuim account holder so i could not see half of your 2nd message.
I did change the format to fixed width. By display width do you mean the Field width that you get after double clicking each column? I changed that also. But got the below mentioned error:

"Short read encountered on import; this most likely indicates one of the following possibilities:
1) the import schema you specified is incorrect
2) invalid data (the schema is correct, but there is an error in the data). "

The schema seems correct, so does the data.

Posted: Fri Jan 02, 2009 4:00 am
by vasa_dxx
Try to read the Records from Data Viewer. If your able to view through Data Viewer, then the schema and other Credentials are supplied correctly. If there is any error, that would be displayed in the error message.

Posted: Fri Jan 02, 2009 4:43 am
by dr.murthy
vasa_dxx wrote:Try to read the Records from Data Viewer. If your able to view through Data Viewer, then the schema and other Credentials are supplied correctly. If there is any error, that would be displayed in the error message.
data viewer is only for view the data in datastes.is there any way to view the sequential file data from data viewer

Posted: Fri Jan 02, 2009 4:57 am
by ray.wurlod
Totally wrong. The data viewer can display data from almost all sources (one exception is Lookup File Set).

Posted: Fri Jan 02, 2009 5:11 am
by dr.murthy
ray.wurlod wrote:Totally wrong. The data viewer can display data from almost all sources (one exception is Lookup File Set). ...
hi ray,

i think that is data browser not a data viewer.

Posted: Mon Jan 05, 2009 5:37 am
by MarkB
dr.murthy wrote: hi ray,

i think that is data browser not a data viewer.
Going back to the problem of the OP and the reply by vasa_dxx, I believe what is meant is that, in the Sequential File Stage, click on View Data, and see what the result is.

Posted: Mon Jan 05, 2009 5:38 am
by MarkB
dr.murthy wrote: hi ray,

i think that is data browser not a data viewer.
Going back to the problem of the OP and the reply by vasa_dxx, I believe what is meant is that, in the Sequential File Stage, click on View Data, and see what the result is.