Column Value as constraint or filter in datastage

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
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Column Value as constraint or filter in datastage

Post by pradeep_nov18 »

Hello Gurus,

Need your expertise idea to crack below requirement.

I have lookup table where i have maintained condition or constraints
Like E.g
Table1
Key V_SQL
1 Name = 'P'
2 Name = 'Q'

So I will join the main data with lookup table based on the key and pass the value has constraint or condition in datastage at runtime.

So if i have 500 constraints ,I can maintain the same in lookup table instead of writing 500 constraints .

The only reason to maintain the lookup table is not touch the datastage code very frequently.

Any solution well appreciated and thank In Advance.
pradeep.v
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Post by ssnegi »

For each row join the Key and Name from the main data with the value in the reference table. So instead of maintaining Name = 'P' maintain
Key V_SQL
1 'P'
Then in the lookup use Drop condition to drop the the incoming record if a join is unsuccessful.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You missed the whole point, I'm afraid.

Pradeep, do an exact search here for "rules engine" to get an idea what can be involved. Most are older discussions but still relevant I believe. You'll also find mention of third party tools like ILOG JRules which is now part of IBM as BRMS.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply