Page 1 of 1

problem while reading from teradata database

Posted: Tue Nov 09, 2010 10:12 am
by RAJARP
Hi,

Source:
Stage :Teradata entreprise stage source_column datatype: sql type :Timestamp, extended :microseconds, nullable:no

Target: :
Teradata entreprise stage, target_column datatype: timestampsource_column datatype: sql type :Timestamp, extended :microseconds, nullable:yes


I am having 4 such timestamp columns.out of which 3 columns are 'nullable' in source. all the four columns are 'nonnullable' in target

whiile running , i am getting the following warning multiple times

Code: Select all

crept_contact_diary,1: Data string '                          ' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss.6': an integer was expected to match tag %yyyy.
Note that 'crept_contact_diary' in the warning message is my source teradata entreprise stage

kindly help me to get rid of this warning

Thanks in advance,
Raja R P

Posted: Tue Nov 09, 2010 10:42 am
by chulett
If your target won't accept nulls, then you'll need to provide an 'in-band' value for those empty timestamps, something that equates to no date. I've seen either low or high values, like 01/01/1900 or 12/31/9999 used, amongst other values. Plus a time, of course.

Posted: Tue Nov 09, 2010 3:10 pm
by roydanlobo
When unloading the data from source you can handle nulls in your transformer Or you can do this before inserting into target according to your requirement.
As craig said use the default value like '12-31-9999 23:59:59' if null else get the value from your source.


Regards,
Roydan

Posted: Wed Nov 10, 2010 5:36 am
by RAJARP
HI,
Thanks to both of you.
Actually in first job where my terdata table was populated i have given default values for all nulls which solved my problem.
But i would like to know

Code: Select all

crept_contact_diary,1: Data string '                          ' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss.6': an integer was expected to match tag %yyyy.
in the above warning message why warning is thrown from 'crept_contact_diary' stage( which is my source stage in the second job where i am reading from the table which is loaded by first job)

Thanks,
Raja R P

Posted: Wed Nov 10, 2010 3:15 pm
by ray.wurlod
DataStage was expecting a date. A field containing all blanks is not a valid date format.

Posted: Wed Nov 10, 2010 6:31 pm
by chulett
So... why is it all spaces? What was the "default value" you used for null dates when you loaded the table?