Hi,
For those who've read my previous post, I'm still trying to design my little sample data warehouse . I'm trying to have, in my fact table, an attribute that links to the previous fact row.
My fact is:
ID
ProductID
TimeStamp
PreviousStamp (that's the one I'm trying to fill).
In other words, when I process the staging table row, I need to lookup the previous TimeStamp for the same ProductID (there may be multiple ones). Do you think that using a regular lookup transform having an ORDER BY TimeStamp clause in its reference dataset, counting on the fact that the lookup will return the first match a good strategy?
I was otherwise thinking of having the 'CurrentRow=Y' kinda scheme in my fact but I think having to go and update the fact table back at the end of the process is a bit too much work for what I'm trying to achieve...
Any thoughts/suggestions on this are welcome
Thanks,
Greg
For those who've read my previous post, I'm still trying to design my little sample data warehouse . I'm trying to have, in my fact table, an attribute that links to the previous fact row.
My fact is:
ID
ProductID
TimeStamp
PreviousStamp (that's the one I'm trying to fill).
In other words, when I process the staging table row, I need to lookup the previous TimeStamp for the same ProductID (there may be multiple ones). Do you think that using a regular lookup transform having an ORDER BY TimeStamp clause in its reference dataset, counting on the fact that the lookup will return the first match a good strategy?
I was otherwise thinking of having the 'CurrentRow=Y' kinda scheme in my fact but I think having to go and update the fact table back at the end of the process is a bit too much work for what I'm trying to achieve...
Any thoughts/suggestions on this are welcome
Thanks,
Greg