Passing partition number to DB2 via the Connector

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

System variable @PARTITIONNUM, available in Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Gazelle
Premium Member
Premium Member
Posts: 108
Joined: Mon Nov 24, 2003 11:36 pm
Location: Australia (Melbourne)

Post by Gazelle »

Thanks for the reply, but in our case we need to run the WLM_SET_CLIENT_INFO procedure in the DB2Connector before reading the database,
i.e. there is no prior Transformer stage, and I do not know how to access the @PARTITIONNUM value from within a Before-SQL statement.

The value really needs to be accessible from within the DB2Connector, because it can use different partitioning than the rest of the job.
e.g. if I look at the DB2 Snapshot when a DB2Connector reads a table, I see two entries: one for the "agent" process (set for each node), and one for the "coordinator" process.
I haven't tested this yet, but my understanding is that if the table is partitioned, then I would see multiple "agent" processes (equal to the number of table partitions that need to be read, which depends on the values of the partition key in the SQL statement).

I get the feeling that "partition" in this context is set by DB2, and not by the DataStage job or the DB2Connector stage. Somehow the value ends up in the $SLOT2 variable within the agent process.
Post Reply