Not able to view data

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
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

Not able to view data

Post by tanaya.deshpande@tieto.co »

Hi

In my source .csv file the Date is in format ddmonyy ..I tried viewing the file through sequentialstage by giving it datatype Date,timestamp and NUmeric ..but I am not able to view it

what data type should i set so that i can view it ..can it be varchar ..
iHijazi
Participant
Posts: 45
Joined: Sun Oct 24, 2010 12:05 am

Post by iHijazi »

Of course it can be VarChar.
Not only thoughts, but a little bit of experience.
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Re: Not able to view data

Post by abhilashnair »

Read it as varchar in the source stage. Have a transformer and use function StringtoDate(Source, "%dd%mmm%yy"). In the target use data type as Date
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

what should be the correct datatype set

Post by tanaya.deshpande@tieto.co »

ok the date column problem is solved by setting it to varchar ..

but I have three decimal columns which have null values in the source ..I am able to view it when I set it as varchar ..but not as decimal..

can anyone tell how i can set default value in sequential file stage for those columns ..so that I am able to view it
iHijazi
Participant
Posts: 45
Joined: Sun Oct 24, 2010 12:05 am

Post by iHijazi »

Go the columns tab, make sure you to set Nullable property to Yes, then double click on that column (double click on the number of the row to the left), under the Properties list click on Nullable, now on the right you'll get the Available properties to add, click on Null Field Value and in the textbox above enter the value you want to show when null.

If you are done, please mark the correct answer then mark post as resolved.

Cheers.
Not only thoughts, but a little bit of experience.
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Re: what should be the correct datatype set

Post by abhilashnair »

Sequential File stage does not understand nulls. So you have to handle it.
Inside Sequential File Stage Properties, go to columns and then double click on the left hand side of the required column name. In that you will find a "Nullable" property. Set a Null Field Value for that. It can be a valid value or an empty string.
tanaya.deshpande@tieto.co
Participant
Posts: 94
Joined: Sun Jul 18, 2010 11:35 pm

Post by tanaya.deshpande@tieto.co »

Thanks abhilash and iHijazi :D I will mark this topic as resolved
Post Reply