Incompatible data type for properly set column

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
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Incompatible data type for properly set column

Post by jackson.eyton »

Hi,
I seem to be having an issue with a source query and its column definitions. Using the netezza connector, the columns defined were all done by hand, not imported from a table definition. I had assumed that certain data types that are NULL from the source, such as SELECT NULL as Column1 FROM TABLE, would need to be cast as the datatype the column is defined to be, however I found that this is not the case. As you can see in the source query I tried this and it made no difference and there are other columns of the same data types that are NULL and are not cast that do not present issues.

Here is the source query:
https://github.com/jacksoneyton/DataSta ... rceQry.sql

Here is an export of the table definitions:
https://github.com/jacksoneyton/DataSta ... mnDefs.dsx

And here is the first error in the job log:
https://github.com/jacksoneyton/DataSta ... r/ErrorLog

I'm quite confused as to what is going on here :-(
-Me
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not really sure what's going on but I'm curious if you get any kind of similar error running that set of UNIONs outside of DataStage? You can have issues if each column in the combined set doesn't have the same data type. Trying to see if this is specific to DataStage and the data types in the job or if the issue is the SQL itself.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

alright figured this out, seems odd that we've not run into this before as this is not a new thing for us but we had to cast every NULL field of non VarChar type to its intended type.
-Me
Post Reply