Timestamp problem with Teradata Enterprise stage

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
vpauls
Premium Member
Premium Member
Posts: 37
Joined: Mon May 09, 2005 2:26 am
Location: Oslo

Timestamp problem with Teradata Enterprise stage

Post by vpauls »

I am using a Teradata Enterprise stage to access a table, where one of the columns is of type Timestamp. When I run the job, I get 8 of the following warnings from the stage:

<StageName>, 1: Data string ' ' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss': an integer was expected to match tag %yyyy.

(The ' ' is actually 19 blanks, the forum for some reason truncates the rest.)

For 8 of the rows in the table, the Timestamp column is NULL, and I suspect that this is causing the warnings. When filtering out the NULL rows (adding an IS NOT NULL clause to the SQL Query, which is not what I need to do) the warnings disappear. The Timestamp column is set to Nullable in the DataStage metadata, in adherence with the database metadata.

Why are the NULL values for the Timestamp column treated as strings of blanks?

Any help is highly appreciated.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you edit the attributes for that column, you can specify another replacement value for null values instead of the default spaces. If you were to define this column as nullable in DataStage it would keep the original NULLs from database.
vpauls
Premium Member
Premium Member
Posts: 37
Joined: Mon May 09, 2005 2:26 am
Location: Oslo

Post by vpauls »

Thanks for the quick response.

Keeping the original NULLs from the database is exactly what I want to achieve. And the column is defined as nullable.

Am I missing something here? I thought it would return true NULLs as long as the column was set as nullable.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That is what it should be doing. I haven't worked with Teradata and think that this might a problem specific to that stage.
Go into the attributes for that column and explicitly set the default value for the column to NULL and see if that makes a difference.
vpauls
Premium Member
Premium Member
Posts: 37
Joined: Mon May 09, 2005 2:26 am
Location: Oslo

Post by vpauls »

I cannot seem to find an attribute for default column value in the Teradata Enterprise stage. I am looking under Output -> Columns -> Edit row...

Maybe it's not possible to specify default value for this stage type?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Even though I don't have Teradata here, the enterprise stage is present and as you noted the attributes cannot be changed. But I did call up the Connectivity Guide for Teradata Database and it states that the enterprise stage doesn't support timestamps (or that Teradata doesn't support that data type).
Post Reply