Page 1 of 1

Null_field for a timestamp field in an orchestrate schema

Posted: Fri Mar 13, 2009 12:26 pm
by mudsx
Hi everybody,

I'm reading a flat file which is interpreted by an orchestrate schema called in an ColumnImport stage.

My schema is written like that :
record nullable {delim=';', final_delim='end', record_delim='\n', timestamp_format="%yyyy%mm%dd %hh:%nn"}
(
CD_ENREG : not_nullable string[max=1];
DT_1 : nullable Timestamp{null_field="19000101 00:00"};
)


When the field DT_1 is NULL in the flat file, the record is rejected because DS couldn't put the value 19000101 00:00 instead of the NULL value.

In the project properties (in the Administrator tool), timestamp are defined like that : %yyyy-%mm-%dd %hh:%nn:%ss

If i use a null_field like "1900-01-01 00:00:00", the record is also rejected because "null_field" length (19) must match field's fixed width (14)...

Do anybody have a value for this null_field?

Thanks by advance,
JPG

Posted: Fri Mar 13, 2009 1:32 pm
by ray.wurlod
Basically, get it right. You need 19 characters to store a timestamp - you will never get one shoehorned into 14 characters. And/or change your timestamp format picture to something like "%yyyy%mm%dd %hh%mm".

Posted: Mon Mar 16, 2009 4:37 am
by mudsx
Thanks Ray,

I haven't my premium account so i couldn't see the rest of your post. I'll try to get it quickly...

When you say i couldn't have a timestamp into 14 characters, the fomat of the input flat file is like that. I receive them minus %ss.

I think i had to read this field like a varchar and rebuild it in a second step in the job in adding the %ss... But that's not really clean...