Custom Warning Generation for Transformer 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
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Custom Warning Generation for Transformer Stage

Post by sohasaid »

Dears,

I need to generate a custom warning from the transformer stage if the length of a certain column has been minimized by mistake. For example, if the column at the data source is Varchar with length 50 and at it's transferred through transformer stage as Varchar with length 10. I found out that transformer stage is not generating any warning in such case. For me, it's important that I can guarantee that data won't be truncated through ETL.

Can I do this?

Regards.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can declare a transform stage output link as "rejects" which triggers a warning in the log, so if you redirect your truncated string records using a constraint you will get warnings in your log. This would be easier than calling the c++ equivalent of DSLogWarn() through a custom buildop in your transform stage.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

ArndW,
my purpose is not to reject these truncated string records, I only want to generate a log warning if they're truncated to pay attention. Finally can I find a project level solution not on the level of transformer stage or job level because I currently have more than one thousand jobs.

Regards.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

ArndW,
my purpose is not to reject these truncated string records, I only want to generate a log warning if they're truncated to pay attention. Finally can I find a project level solution not on the level of transformer stage or job level because I currently have more than one thousand jobs.

Regards.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can think of no project-level method of doing this; you will get a generic warning stating that truncation may occur, but without explicitly coding for truncation you won't get the warnings the way you would like.
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Try enabling RCP on the transformer ? It may then generate a warning

Regards
Sreeni
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

Thanks ArndW.
Sreenivasulu, RCP is enabled but no warning :(

Regards.
Post Reply