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
Stage Variable Question
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 56
- Joined: Fri Apr 21, 2006 9:53 am
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?
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?
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
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
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
Thanks
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
-
- Charter Member
- Posts: 56
- Joined: Fri Apr 21, 2006 9:53 am
- 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
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
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,
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,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.