New Logic

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
Xpert
Premium Member
Premium Member
Posts: 85
Joined: Wed Mar 01, 2006 7:17 am

New Logic

Post by Xpert »

Hi all,

I have a source table which have column CUST_SEG_CODE and another column TGT_CODE.

I have another table which have the rules for transformation.

The structure is as like below.

Rulegrpcode Baseval Expression TGT_CODE ExecSeqNo
PSCUSTCLAS 98 IF(CUSTSEGMTCODE=98 ) AND (ACCLASS=611101) 101 1
PSCUSTCLAS 98 IF(CUSTSEGMTCODE=98 ) AND (ACCLASS=611101) AND (PRODUCT=345) 204 2

I have to transform the data based on the Expression column values with the execution sequence number by using Datastage.

Could any one please help me on this?

Thanks in advance.
With regards,
Xpert
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

I cant understand your requirement, can you elaborate it. You need to specify what columns belong to what table and what is the business logic in you transformations.
hi sam here
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What does the execution sequence number do?

If I understand you example correctly, the second case (execution sequence number 2) can never occur because the test on CUSTSEGMTCODE and ACCLASS is already satisfied in the first condition.

In any case, build the expression as nested If..Then..Else with the test conditions' execution sequence numbers determining where they will occur in the hierarchy.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Xpert
Premium Member
Premium Member
Posts: 85
Joined: Wed Mar 01, 2006 7:17 am

Post by Xpert »

Based on the transformation table EXPRESSION column, I need to perform the conditions with the source table. I dont understand, how Datastage will pick the EXPRESSION column values as conditions and perform according to that.

And through UI, those EXPRESSION Column conditions may change in period of time. So I have to pass this conditions dynamically.

Ray,
Thanks for your reply.

I understand that first sequence execution will satisfy both the conditions and for the records which satisfy the second condition have to update those records with the target code.
With regards,
Xpert
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Sorry. "I understand that..." can get you deep in the brown stuff as an ETL developer. Get confirmation of the precise requirement/specification from whoever did the analysis and created the source-to-target mappings, and get them to sign off on it.

That way, when you deliver what you can prove they asked for, changes become billable.
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