Page 1 of 1

Not able to view data

Posted: Tue Mar 22, 2011 12:18 am
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 ..

Posted: Tue Mar 22, 2011 12:23 am
by iHijazi
Of course it can be VarChar.

Re: Not able to view data

Posted: Tue Mar 22, 2011 12:24 am
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

what should be the correct datatype set

Posted: Tue Mar 22, 2011 12:39 am
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

Posted: Tue Mar 22, 2011 12:52 am
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.

Re: what should be the correct datatype set

Posted: Tue Mar 22, 2011 12:55 am
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.

Posted: Tue Mar 22, 2011 1:48 am
by tanaya.deshpande@tieto.co
Thanks abhilash and iHijazi :D I will mark this topic as resolved