how can we add parameters in 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

thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

how can we add parameters in transformer stage

Post by thumati.praveen »

Hi,

I am facing one problem with tranformer surrogate key tab.
if any body did the Parameters in surrogate key tab for database sequnce type please assest me the same.

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

Post by ArndW »

What exactly is the problem? I just tested it and it worked as expected with parameters.
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

ArndW wrote:What exactly is the problem? I just tested it and it worked as expected with parameters. ...
Actully i need to pass database connection details as parameter values to transformer stage for getting surrogate key from db2 sequence.

have you checeked? please letme know.

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

Post by ArndW »

Have you tried manually entering the parameters, e.g. "#UserId#'?
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

ArndW wrote:Have you tried manually entering the parameters, e.g. "#UserId#'? ...
yes, it is not allowing.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you explain? does that mean you cannot type it in, or that you cannot compile or that it won't run correctly?
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

ArndW wrote:Can you explain? does that mean you cannot type it in, or that you cannot compile or that it won't run correctly? ...
It is allowing to type the parameters but you know tha job is aborting because the database values are taking what you are typed in the text boxes.

suppose if you type the user=#userid# password=#pswd#

it is taking direclty #userid# and #pswd# as a values.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In that case I think you have discovered a limitation; it is unclear from the documentation as to whether or not this is a bug (which means that it probably isn't a bug according to IBM). I would guess that the only workaround is to hard-code the values and create an appropriate DB2 userid with access rights limited to just this sequence.
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

ArndW wrote:In that case I think you have discovered a limitation; it is unclear from the documentation as to whether or not this is a bug (which means that it probably isn't a bug according to IBM). I would guess that the only workaround is to hard-code the values and create an appropriate DB2 userid with access rights limited to just this sequence.
you know it is very dificult if the database will change again I need to open my all jobs i need to edit the transformer for testing and production.

can we add this fuctionality to transfomer by writing any code?is it possible?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you need database connection details in a Transformer stage?! This stage type does not connect to databases.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

ray.wurlod wrote:Why do you need database connection details in a Transformer stage?! This stage type does not connect to databases. ...
in v8 we have option to connect the database through transformer stage for getting the surrogate key from database sequences.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray - this is neat new V8 functionality (that ...almost... works)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Guys, do the parameter names need to be surrounded with hashes in the transformer stage?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In those boxes they would have to be, since it expects string values.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I always use a state file and Surrogate Key Generator (or SCD) stage. I guess that's why I never spotted it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply