I am interested in knowing what methods are avialable for accessing the column name and other column information within transform deriviations.
Suppose I wished to perform lookup on source whose key is the column names on my input data. My first step would be to create a new column and try to populate this with the column name. I prefer this not to be done manually.
I am interested in both server and parallel solutions.
TIA.
Obtaining Column Information within Transform.
Moderators: chulett, rschirm, roy
gsherry1,
you can use the DSGetJobInfo() routine to get information about stages and links in your job (using key DSJ.ME or other jobs by doing a DSAttachJob() to them), then use DSGetLinkInfo() and DSGetStageInfo() to get the information you are seeking.
Note that these are informational routines, you cannot add a column to a job during it's run. Server jobs do not allow this, and while there are nifty things that can be done in Px without specifying column names there is no call there either to manipulate the columns.
you can use the DSGetJobInfo() routine to get information about stages and links in your job (using key DSJ.ME or other jobs by doing a DSAttachJob() to them), then use DSGetLinkInfo() and DSGetStageInfo() to get the information you are seeking.
Note that these are informational routines, you cannot add a column to a job during it's run. Server jobs do not allow this, and while there are nifty things that can be done in Px without specifying column names there is no call there either to manipulate the columns.
Hi,
What do you mean by not manually?
If loading a prevously imported table definition to the column tab in a stage is good enough for you then you'll only be imlementing good practice.
There is no real need to manually code a column name unless it is a temporary one that doesn't reside in your source table definition or final target table definition.
IHTH,
What do you mean by not manually?
If loading a prevously imported table definition to the column tab in a stage is good enough for you then you'll only be imlementing good practice.
There is no real need to manually code a column name unless it is a temporary one that doesn't reside in your source table definition or final target table definition.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In parallel jobs you can use a Lookup stage against a Lookup File Set stage or performing a sparse lookup against a database stage (e.g. DB2 or Oracle). In either case the lookup key column is mapped automatically with no requirement for manual intervention.
No such capability exists in server jobs (as at version 7.5.x).
No such capability exists in server jobs (as at version 7.5.x).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.