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

Boolean dimensions

3 posters

Go down

Boolean dimensions Empty Boolean dimensions

Post  simmo2013 Tue Nov 05, 2013 4:30 am

Hi there!

Quick question when I have a simple yes/no dimension for example is my product on sale or not what is best pratice to model this?

Thanks

Simmo

simmo2013

Posts : 6
Join date : 2013-11-05

Back to top Go down

Boolean dimensions Empty Re: Boolean dimensions

Post  BoxesAndLines Tue Nov 05, 2013 10:01 am

Make it the smallest numeric datatype that is still summable. I typically add these to the fact table since folks want to count them.
BoxesAndLines
BoxesAndLines

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

Back to top Go down

Boolean dimensions Empty Re: Boolean dimensions

Post  ngalemmo Tue Nov 05, 2013 1:45 pm

And it you have a lot of them, you can collect them in a junk dimension.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Boolean dimensions Empty Re: Boolean dimensions

Post  simmo2013 Tue Nov 05, 2013 2:24 pm

Thanks for the responses. What is best in terms of performance: degenerate dims for say 3 y/n fields in the fact table or a junk dimension?

My fact table will have around 325 million transactions for about 30 million unique orders...

simmo2013

Posts : 6
Join date : 2013-11-05

Back to top Go down

Boolean dimensions Empty Re: Boolean dimensions

Post  ngalemmo Tue Nov 05, 2013 4:40 pm

Its probably a wash. Given its only 3 flags, I would leave them on the fact.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Boolean dimensions Empty Re: Boolean dimensions

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