Implementing business rules
Posted: Fri Mar 23, 2007 11:58 am
<p>I'm relatively new to DataStage and I've found that it's very cumbersome to maintain complex business rules the way we do it. I'm wondering if there's a better way.</p><p>Say that we have business rules like these:</p><pre>
column a column b column c action
-------- -------- -------- --------
a1 b1 c1 Action 1
a2 b2 c2 Action 2
a3 b3 c3 Action 3
ELSE Action 4</pre><p>Here, a1, b1, etc. can be either fixed values or patterns (such as "*Inc").</p><p>We implement things like this by using a transformer with several outputs and we define contraints within the transformer to send each record through its corresponding output, depending on which rule (set of patterns) the record matches. The problem with this is that the constraints in the transformer become huge IF-ELSE statements that are very difficult to maintain and are prone to human mistakes.</p><p>Is there any stage (in either server or parallel jobs) that allows to implement business rules like this in a better way (i.e. <b>without</b> the IF-ELSE statements)?</p><p>Thank you!</p><p>Carlos</p>
column a column b column c action
-------- -------- -------- --------
a1 b1 c1 Action 1
a2 b2 c2 Action 2
a3 b3 c3 Action 3
ELSE Action 4</pre><p>Here, a1, b1, etc. can be either fixed values or patterns (such as "*Inc").</p><p>We implement things like this by using a transformer with several outputs and we define contraints within the transformer to send each record through its corresponding output, depending on which rule (set of patterns) the record matches. The problem with this is that the constraints in the transformer become huge IF-ELSE statements that are very difficult to maintain and are prone to human mistakes.</p><p>Is there any stage (in either server or parallel jobs) that allows to implement business rules like this in a better way (i.e. <b>without</b> the IF-ELSE statements)?</p><p>Thank you!</p><p>Carlos</p>