Page 1 of 1

Blank "Timestamp" field shows *****

Posted: Tue Mar 20, 2007 11:18 am
by ady
Hi,

I have a job where I get blank data from the source for a column with "Timestamp" datatype in a seq file. The source is from a server job.

When i view the data in parallel it shows blank columns but when I write the data in a seq file or a dataset.... The data shows as "*******"

Please help me solve this

Posted: Tue Mar 20, 2007 11:27 am
by DSguru2B
Are you doing any type conversions for this particular column? Give us more info on your design.

Posted: Tue Mar 20, 2007 11:41 am
by ady
No type conversion in the job. I am performing two joins on the data but no transformations and type conversions.



SEQ file Seqfile

> join1 > Join2 > Output Seq File
Seq File

Posted: Tue Mar 20, 2007 11:56 am
by DSguru2B
You need to do type conversions. If the file was created by a server job, everything is a string. For Date fields you need to specify StringToDate(). Handle nulls before that.

Posted: Tue Mar 20, 2007 12:14 pm
by ady
I do not use a parallel transformer in my jobs , I use a basic transformer in my parallel jobs too. Where can I specify type conversions

Posted: Tue Mar 20, 2007 1:53 pm
by ady
When i specify a default value in the table definition , I dont get the **** anymore ... Cant I insert blank space in "Timestamp" field?

Posted: Tue Mar 20, 2007 3:07 pm
by DSguru2B
Well then you need to use modify stage. Type conversions are needed in parallel jobs.

Posted: Tue Mar 20, 2007 6:18 pm
by ray.wurlod
Blank is not a valid timestamp, therefore you can not insert it in a timestamp field.

If you are writing to a text file, you can replace NULL with a Null Field Value, but blank is not the same as NULL; you might need to convert blank to NULL in an upstream stage.

If the text file is fixed width format, the Null Field Value must have the same number of characters as the Field Width. For example, for a timestamp with no fractional seconds, this means 19 characters. All blanks would be OK, so long as there were 19 of them.

Posted: Wed Mar 21, 2007 8:32 am
by ady
@DSguru

So my job will look like


seq file > modify > ...rest of the job....>>>

Would that solve my problem?

Posted: Wed Mar 21, 2007 9:02 am
by DSguru2B
First create a test job that reads your source, changes the datatypes using modify stage and then loads it back to a sequential file stage. If this works out then you can replace the target sequential file stage with the your "rest of the job".