Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Solved] ROW_IS_CURRENT

3 posters

Go down

[Solved] ROW_IS_CURRENT Empty [Solved] ROW_IS_CURRENT

Post  exhortae Tue Jan 29, 2013 9:56 am

Hi,


Why do we need a ROW_IS_CURRENT column in a dimension.


Thanks.


Last edited by exhortae on Wed Jan 30, 2013 5:25 am; edited 1 time in total

exhortae

Posts : 30
Join date : 2010-08-01

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  BoxesAndLines Tue Jan 29, 2013 9:59 am

To easily identify the current row in a type 2 SCD.
BoxesAndLines
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  exhortae Tue Jan 29, 2013 10:43 am

BoxesAndLines wrote:To easily identify the current row in a type 2 SCD.

For what purpose ?

* In a lookup to easily retrieve the primary key in a dimension ?
* When building reports ?
* ... ?

exhortae

Posts : 30
Join date : 2010-08-01

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  TheNJDevil Tue Jan 29, 2013 11:12 am

I think if you understood what a Type 2 SCD was in more detail, you would see the need for ROW_IS_CURRENT.

* In a lookup to easily retrieve the primary key in a dimension ? YES
* When building reports ? YES

Basically, anytime you need to separate the current record from the change record history.

TheNJDevil

Posts : 68
Join date : 2011-03-01

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  BoxesAndLines Tue Jan 29, 2013 11:41 am

Assume I have a credit status code in my type 2 customer dimension. Now, tell me the current credit status of all customers.

Select * from customer_dim where current_row_ind = 'Y'

or

Select * from customer_dim where row_end_dt = '12/31/9999'

Two ways to skin the cat.
BoxesAndLines
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  exhortae Wed Jan 30, 2013 5:25 am

BoxesAndLines wrote:
Select * from customer_dim where row_end_dt = '12/31/9999'


I always used this one, I tought row_is_current might bring something else.

Thanks

exhortae

Posts : 30
Join date : 2010-08-01

Back to top Go down

[Solved] ROW_IS_CURRENT Empty Re: [Solved] ROW_IS_CURRENT

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum