Page 1 of 1

Stage Variable Question

Posted: Mon Apr 18, 2011 8:40 am
by mail2krishna79
I have a requireent like this:

Old Value : ABCD
New Value: ABCDEF

we must keep both values. There will be a period of time that we will see both because some records will be in the pipeline. So we need to account for both naming conventions.

I created a Stage Variable for this. I did almost coding part but how do i keep both the values in the mart?

Can you guys help me in coding part

Posted: Mon Apr 18, 2011 8:51 am
by asorrell
Your example isn't good enough. What are the business rules that govern the change?

We could play "guess the rules" all day long...

For example:
- do both have to be kept for more than one run?
- When do you need to use one or the other?
- What do you mean by "keep both values in the mart"? Are you trying to implement a slowly changing dimension?

Posted: Mon Apr 18, 2011 8:56 am
by swapnilverma
your requirement is bit unclear ....
I assume you want to keep two values current and previous
if this is the case you can have two stage variable and use swap logic

A=B
B=C
C=A

this way you can keep both...

if i have misunderstood ur query ... plz provide more info

Posted: Mon Apr 18, 2011 9:13 am
by mail2krishna79
- do both have to be kept for more than one run?
Ans : yes. I have a scenario like this.
File contains old values as "Customer/details
They decide to change that value as "Customer of Details"
Over a period of time old value might come or new value might come or both at once. we have accountable both old and new value.

Please ignore "keep both values in the mart". Assume the file is getting loading into a table.

asorell, Thank you so much for your reply

Posted: Mon Apr 18, 2011 9:24 pm
by jwiles
To me this sounds like a basic data validation rule: If field = old_form or field = new_form then 'OK' else 'BAD'

If you have a set of known values, both old and new, perhaps you can place them into a table to be used with a lookup stage. If the difference is more of a format change (such as 11 Jan 2011 vs 2011-01-11), then maybe logic in one stage variable checks for the old format, logic in another checks for the new format and if either matches then the field is ok.

Regards,