BuildOp Questions

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
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

BuildOp Questions

Post by gsherry1 »

Suppose I wished to have same functionality of Remove Duplicates stage, but also have deduped records go to a reject port.

I have read many solutions in achieving this with transformer stage.
I prefer to have an inteface that would have the user specify a key and options to keep first or last instance of duplicate. Is this achievable through a buildop?

From reading the documentation on buildops, it looks as though you can pass column name as a parameters. Do buildops have the ability to access the previous record as you could with transform macros?

Thanks.
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Post by gsherry1 »

Does anybody have examples of buildops where there is some aggregation functionality being done, or making use of column names passed as parameters?
cyh
Participant
Posts: 18
Joined: Tue Jan 20, 2004 3:23 am

Post by cyh »

Have you turn off the auto write / read option in the output / input ? You may have to define the way of reading / writing record by yourself. For example,

In the pre-loop logic:

Code: Select all

  init the key
  init the temp variable
In the per-loop logic :

Code: Select all

  check the key
  if key break
     write record
  read record
Let's have a try ...
Post Reply