Save in some way name of column in transformer

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
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Save in some way name of column in transformer

Post by sangi1981 »

Hi,
I write for information.
I have a ETL, that at some point in a transformer stage makes formal checks on the data.
Data that fail these checks must be discarded.
I add some control fields in transformer.
Among these I'd like one that contains the field name for which I need to control.
Is there a way to save the name of the column in question.
Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Drag and drop, choose Derivation substitution after highlighting all the columns that have the source columns that are being tested, perform a field to grab everything after the dot (.) and surround it with quotes.
Do the above if dealing with large number of columns, for a few, just hardcode the values yourself.
Not a fancy solution but it works.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do each of the checks in a separate stage variable. For each of these initialize a corresponding stage variable to contain the name of the column or columns that are the subject of the test. Use that on the output link that captures failed rows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Post by sangi1981 »

I had also thought about a similar solution, using the stage variables.
I was hoping, instead, that the column metadata of the stream were intercepted in some way, rather than enhance them by hand.
This can be considered a workaround.
Thanks :-)
Post Reply