<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2337378998924534323</id><updated>2025-11-16T07:05:34.209-08:00</updated><category term="Dimension Tables"/><category term="Concepts"/><category term="Hands-on Practice"/><category term="Fact Tables"/><category term="ETL"/><category term="Slowly Changing Dimensions"/><category term="Big Data"/><category term="Analysis"/><category term="Star Schema"/><category term="Conformed Dimensions"/><category term="Job Search"/><category term="Snowflake Schema"/><category term="Videos"/><category term="Bridge Tables"/><title type='text'>Valuable Data</title><subtitle type='html'>A Blog That Examines Data Warehousing Concepts With Examples</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-2652116111716344873</id><published>2014-04-25T05:00:00.000-07:00</published><updated>2014-05-23T06:25:56.024-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Big Data"/><category scheme="http://www.blogger.com/atom/ns#" term="Videos"/><title type='text'>Data Helping To Fight Crime</title><content type='html'>In her role as the District Attorney of New Jersey, Anne Milgram found the crime fighting arena to be horribly inefficient. &amp;nbsp;For example, she recalls a time when an individual was arrested and held on a bail amount of $3,500 dollars and was unable to pay that amount. &amp;nbsp;As a result, he stayed in jail until his case was heard eight months later, which cost the public over $9,000 dollars. &amp;nbsp;Believing that data could help, Ms. Milgram developed a tool to help correct this, making crime fighting a data driven activity. &amp;nbsp;This is a great example of somebody who is taking data and turning it into something that is truly valuable. &amp;nbsp;She describes this experience in &lt;a href=&quot;http://www.ted.com/talks/anne_milgram_why_smart_statistics_are_the_key_to_fighting_crime&quot; target=&quot;_blank&quot;&gt;this TED talk&lt;/a&gt;.
&lt;p&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://embed.ted.com/talks/anne_milgram_why_smart_statistics_are_the_key_to_fighting_crime.html&quot; webkitallowfullscreen=&quot;&quot; width=&quot;600&quot;&gt;&lt;/iframe&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/2652116111716344873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/04/data-helping-to-fight-crime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2652116111716344873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2652116111716344873'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/04/data-helping-to-fight-crime.html' title='Data Helping To Fight Crime'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-705164966346393007</id><published>2014-04-18T05:00:00.000-07:00</published><updated>2014-04-18T05:00:02.360-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Hands-on Practice"/><title type='text'>Creating Date Dimensions</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsVx4_YGoyertk5RP2-qaszP71web5K4NouHFfR9_DaCGk7VDgEj3qxXE5XsXjuPtbUP-m0JELP9NqWLbNXg22iCJxE1Sm_mKiy2rDWsQ1xpX1jl74Ix3K22jP1Bxpc8UWbJQXxAF7HQQ/s1600/ID-10073553.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsVx4_YGoyertk5RP2-qaszP71web5K4NouHFfR9_DaCGk7VDgEj3qxXE5XsXjuPtbUP-m0JELP9NqWLbNXg22iCJxE1Sm_mKiy2rDWsQ1xpX1jl74Ix3K22jP1Bxpc8UWbJQXxAF7HQQ/s1600/ID-10073553.jpg&quot; height=&quot;246&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the tasks of an architect who is implementing a data warehouse is to create the date dimensions. &amp;nbsp;Because these dimensions have no source system, they are often created in something like Excel and then inserted directly into the dimension tables themselves. &amp;nbsp;Searching the internet will probably reveal some code that will automatically create these dimensions. &amp;nbsp;I&#39;ve created one such PL/SQL block here that will create three date dimensions, a daily, monthly, and yearly grain. &amp;nbsp;Because this will probably only be run once, there is no error handling nor is there a way to add to the date dimension (it will only create from scratch). &amp;nbsp;Feel free and add those features if you so desire. &amp;nbsp;Here is an explanation of the parameters:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.) p_begin_year&lt;/b&gt; - This is the first year of the range of dates that you wish to create&lt;br /&gt;
&lt;b&gt;2.) p_end_year&lt;/b&gt; - This is the last year of the range of dates that you wish to create&lt;br /&gt;
&lt;b&gt;3.) p_create_tables&lt;/b&gt; - This is intended to have a value of YES or NO. &amp;nbsp;Set it to YES if you want the tables to be created and populated. &amp;nbsp;Set it to no if you only want the tables to be populated (e.g., they have already been created).&lt;br /&gt;
&lt;b&gt;4.) p_include_fiscal_year &lt;/b&gt;- If you would like some data related to your fiscal year in the dim_day and dim_month tables, then set this value to YES. &amp;nbsp;Otherwise, set it to NO.&lt;br /&gt;
&lt;b&gt;5.) p_fiscal_year_begin_month_no&lt;/b&gt; - If the answer to #4 is YES, then set this to the calendar month number that is the first month in your fiscal year. &amp;nbsp;In other words, if your fiscal year begins in July, set this to 7. &amp;nbsp;If it begins in October, set it to 10, etc.&lt;br /&gt;
&lt;br /&gt;
If nothing else, this will be a starting point for you with regards to creating a date dimension. &amp;nbsp;Examine the code, tweak it, etc. &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt; This has been written in PL/SQL, meaning that it will only run in an Oracle database. &amp;nbsp;If you would like to do this with a system from another database vendor, similar scripts can be written in that vendor&#39;s native language.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
declare&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p_begin_year int := 2001;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p_end_year int := 2014;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p_create_tables varchar2(3) := &#39;YES&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p_include_fiscal_year varchar2(3) := &#39;YES&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p_fiscal_year_begin_month_no int := 7;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;d_first_day date;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;d_last_day date;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;d_loop_day date;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;i_counter int;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if upper(p_create_tables) = &#39;YES&#39; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;CREATE TABLE DIM_DAY &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;KEY_DAY INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;CALENDAR_DAY DATE, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;CALENDAR_MONTH_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;MONTH_NAME VARCHAR2(50), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;CALENDAR_QUARTER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;CALENDAR_YEAR INT &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;)&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end if;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select to_date(&#39;01-JAN-&#39; || p_begin_year, &#39;DD-MON-YYYY&#39;) into d_first_day from dual;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select to_date(&#39;31-DEC-&#39; || p_end_year, &#39;DD-MON-YYYY&#39;) into d_last_day from dual;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;d_loop_day := d_first_day;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;i_counter := 1;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while d_loop_day &amp;lt;= d_last_day&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop &amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;insert into dim_day (key_day, calendar_day, calendar_month_number, month_name, calendar_quarter, calendar_year) &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;select &#39; || i_counter || &#39;, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;&#39;&#39;&#39; || to_char(d_loop_day, &#39;DD-MON-YYYY&#39;) || &#39;&#39;&#39;, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;extract(month from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YYYY&#39;&#39;)),&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;to_char(to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;), &#39;&#39;MONTH&#39;&#39;), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;case when extract(month from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;)) between 1 and 3 then 1 &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;when extract(month from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;)) between 4 and 6 then 2 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;when extract(month from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;)) between 7 and 9 then 3 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;when extract(month from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;)) between 10 and 12 then 4 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;else -1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;end, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;extract(year from to_date(&#39;&#39;&#39; || d_loop_day || &#39;&#39;&#39;, &#39;&#39;DD-MON-YY&#39;&#39;)) &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;from dual &#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; i_counter := i_counter + 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; d_loop_day := trunc(d_loop_day) + 1;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end loop;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;commit;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if p_include_fiscal_year = &#39;YES&#39; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if p_create_tables = &#39;YES&#39; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXECUTE IMMEDIATE &#39;alter table dim_day &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;add &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;( &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;FISCAL_MONTH_NUMBER INT, &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;FISCAL_QUARTER INT, &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;FISCAL_YEAR INT &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;) &#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; end if;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;update dim_day o &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;set (o.fiscal_month_number, o.fiscal_year) = &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;select case when i.calendar_month_number - &#39; || p_fiscal_year_begin_month_no || &#39; &amp;gt;= 0 then &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;(i.calendar_month_number - &#39; || p_fiscal_year_begin_month_no || &#39;) + 1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;else &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;12 + (i.calendar_month_number - &#39; || p_fiscal_year_begin_month_no || &#39;) + 1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;end, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;case when i.calendar_month_number - &#39; || p_fiscal_year_begin_month_no || &#39; &amp;gt;= 0 then &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;i.calendar_year &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;else &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;i.calendar_year + 1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;end &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;from dim_day i &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;where i.calendar_day = o.calendar_day &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;) &#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;update dim_day o &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;set o.fiscal_quarter = &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;select case when i.fiscal_month_number in (1,2,3) then 1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;when i.fiscal_month_number in (4,5,6) then 2 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;when i.fiscal_month_number in (7,8,9) then 3 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;when i.fiscal_month_number in (10,11,12) then 4 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;else -1 &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;end &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;from dim_day i &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;where i.calendar_day = o.calendar_day &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;) &#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;commit;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end if;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if upper(p_create_tables) = &#39;YES&#39; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if p_include_fiscal_year = &#39;YES&#39; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;EXECUTE IMMEDIATE &#39;CREATE TABLE DIM_MONTH &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;KEY_MONTH INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_MONTH_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_MONTH_NAME VARCHAR2(20), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_QUARTER_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_YEAR INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;FISCAL_MONTH_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;FISCAL_QUARTER_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;FISCAL_YEAR INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;FIRST_DAY DATE, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;LAST_DAY DATE &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;) &#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;EXECUTE IMMEDIATE &#39;CREATE TABLE DIM_MONTH &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;KEY_MONTH INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_MONTH_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_MONTH_NAME VARCHAR2(20), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_QUARTER_NUMBER INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;CALENDAR_YEAR INT, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;FIRST_DAY DATE, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;LAST_DAY DATE &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;) &#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;end if;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end if;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if p_include_fiscal_year = &#39;YES&#39; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;insert into dim_month &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;select rownum, a.* &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;from &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;select &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;distinct calendar_month_number, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;month_name, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;calendar_quarter, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;calendar_year, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;fiscal_month_number, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;fiscal_quarter, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;fiscal_year, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;trunc(calendar_day,&#39;&#39;month&#39;&#39;), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;last_day(calendar_day) &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;from &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;dim_day &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;order by calendar_year, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;|| &#39;calendar_month_number &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;) a &#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;commit;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;insert into dim_month &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;select rownum, a.* &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;from &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp;|| &#39;select &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;distinct calendar_month_number, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;month_name, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;calendar_quarter, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;calendar_year, &amp;nbsp;&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;first_day(calendar_day), &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;|| &#39;last_day(calendar_day) &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;from &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;dim_day &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;) &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;order by a.calendar_year, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;a.calendar_month_number &#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;commit;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end if;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if upper(p_create_tables) = &#39;YES&#39; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXECUTE IMMEDIATE &#39;CREATE TABLE DIM_CALENDAR_YEAR &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;KEY_CALENDAR_YEAR NUMBER, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;CALENDAR_YEAR NUMBER, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;FIRST_DAY DATE, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;LAST_DAY DATE &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;) &#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end if;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; EXECUTE IMMEDIATE &#39;insert into dim_calendar_year &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;|| &#39;select rownum, a.* &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;|| &#39;from &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;|| &#39;( &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;select distinct calendar_year, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;&#39;&#39;01-JAN-&#39;&#39; || calendar_year || &#39;&#39;&#39;&#39;, &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;|| &#39;&#39;&#39;31-DEC-&#39;&#39; || calendar_year || &#39;&#39;&#39;&#39; &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;|| &#39;from dim_month &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; || &#39;order by calendar_year &#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;|| &#39;) a &#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;commit;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 20.799999237060547px;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2624&quot; target=&quot;_blank&quot;&gt;Anusorn P nachol&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 20.799999237060547px;&quot;&gt;&amp;nbsp;/ &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/705164966346393007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/04/creating-date-dimensions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/705164966346393007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/705164966346393007'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/04/creating-date-dimensions.html' title='Creating Date Dimensions'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsVx4_YGoyertk5RP2-qaszP71web5K4NouHFfR9_DaCGk7VDgEj3qxXE5XsXjuPtbUP-m0JELP9NqWLbNXg22iCJxE1Sm_mKiy2rDWsQ1xpX1jl74Ix3K22jP1Bxpc8UWbJQXxAF7HQQ/s72-c/ID-10073553.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-6927246011815491093</id><published>2014-04-11T05:00:00.000-07:00</published><updated>2014-04-11T05:00:16.002-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Slowly Changing Dimensions"/><title type='text'>Slowly Changing Dimensions - Correction</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdGe2OlJ5L3CNmO4LFr65mmJpLeMTD3xTk-V_wn68qOlKKf6Bwl2sGaHr50TDDJYmEZeCu-WxbFAzge-wpQ2-Ddx6rreDAOAbCbsHd5ETlst5VwHOgfv69xwTucpiN5SF67fwRNQiAsOI/s1600/ID-10082665.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdGe2OlJ5L3CNmO4LFr65mmJpLeMTD3xTk-V_wn68qOlKKf6Bwl2sGaHr50TDDJYmEZeCu-WxbFAzge-wpQ2-Ddx6rreDAOAbCbsHd5ETlst5VwHOgfv69xwTucpiN5SF67fwRNQiAsOI/s1600/ID-10082665.jpg&quot; height=&quot;320&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
About two years ago, I wrote &lt;a href=&quot;http://valuabledata.blogspot.com/2012/03/slowly-changing-dimensions.html&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt; on slowly changing dimensions. &amp;nbsp;Several months later I learned in a Kimball class that my understanding of a Type 3 Slowly Changing Dimension (SCD) was incorrect. &amp;nbsp;Allow me to use this post to right the ship.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;My original explanation (incorrect):&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A type 3 SCD is essentially a hybrid of a type 1 and type 2 SCD. &amp;nbsp;In this scenario as history changes, rows are added into the dimension table, consistent with a type 2 SCD. &amp;nbsp;Each row contains a column with the value that pertains to that moment in time, as does a type 2 SCD. &amp;nbsp;Each row also contains a column with the &lt;i&gt;&lt;b&gt;current&lt;/b&gt;&lt;/i&gt; value. &amp;nbsp;So, continuing with the example above (from the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/03/slowly-changing-dimensions.html&quot; target=&quot;_blank&quot;&gt;other post&lt;/a&gt;), while you will be able to see that the older fact rows pertain to a time in which the employee was a Junior Analyst, you will also be able to see (while looking at this same historical dataset) that the employee is now a Senior Analyst.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;My updated explanation (correct):&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A type 3 SCD is essentially a hybrid of a type 1 and type 2 SCD. &amp;nbsp;In this scenario as history changes, rows are added into the dimension table, consistent with a type 2 SCD. &amp;nbsp;Each row contains a column with the value that pertains to that moment in time, as does a type 2 SCD. &amp;nbsp;Each row also contains a column with the &lt;i&gt;&lt;b&gt;prior&lt;/b&gt;&lt;/i&gt; value. &amp;nbsp;So, continuing with the example above, while you will be able to see that the newer fact rows describe this employee as a Senior Analyst, you will be able to see that his/her prior position was Junior Analyst.&lt;/div&gt;
&lt;br /&gt;
So, a type 3 SCD will look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 597px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 3657; mso-width-source: userset; width: 75pt;&quot; width=&quot;100&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5339; mso-width-source: userset; width: 110pt;&quot; width=&quot;146&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5229; mso-width-source: userset; width: 107pt;&quot; width=&quot;143&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 4059; mso-width-source: userset; width: 83pt;&quot; width=&quot;111&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl63&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 75pt;&quot; width=&quot;100&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;key_employee&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 110pt;&quot; width=&quot;146&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;employee_first_name&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 107pt;&quot; width=&quot;143&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;employee_last_name&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;position&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 83pt;&quot; width=&quot;111&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;prior_position&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;1&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;John&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Smith&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Junior Analyst&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;(null)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;John&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Smith&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Senior Analyst&lt;/td&gt;
  &lt;td class=&quot;xl64&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Junior Analyst&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
My original explanation above describes a type 6 slowly changing dimension, which will look something like this:&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 597px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 3657; mso-width-source: userset; width: 75pt;&quot; width=&quot;100&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5339; mso-width-source: userset; width: 110pt;&quot; width=&quot;146&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5229; mso-width-source: userset; width: 107pt;&quot; width=&quot;143&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 4059; mso-width-source: userset; width: 83pt;&quot; width=&quot;111&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 75pt;&quot; width=&quot;100&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;key_employee&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; width: 110pt;&quot; width=&quot;146&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;employee_first_name&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; width: 107pt;&quot; width=&quot;143&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;employee_last_name&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;position&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; width: 83pt;&quot; width=&quot;111&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;current_position&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;1&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;John&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Smith&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Junior Analyst&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Senior Analyst&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;John&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Smith&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Senior Analyst&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Senior Analyst&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
These links to Ralph Kimball&#39;s website provide some great information on slowly changing dimensions:&lt;br /&gt;
&lt;br /&gt;
1.) &lt;a href=&quot;http://www.kimballgroup.com/2008/08/21/slowly-changing-dimensions/&quot; target=&quot;_blank&quot;&gt;Type 1&lt;/a&gt;&lt;br /&gt;
2.) &lt;a href=&quot;http://www.kimballgroup.com/2008/09/22/slowly-changing-dimensions-part-2/&quot; target=&quot;_blank&quot;&gt;Types 2 and 3&lt;/a&gt;&lt;br /&gt;
3.) &lt;a href=&quot;http://www.kimballgroup.com/2013/02/05/design-tip-152-slowly-changing-dimension-types-0-4-5-6-7/&quot; target=&quot;_blank&quot;&gt;Types 0, 4, 5, 6, and 7&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=4061&quot; target=&quot;_blank&quot;&gt;adamr&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/6927246011815491093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/04/slowly-changing-dimensions-correction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/6927246011815491093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/6927246011815491093'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/04/slowly-changing-dimensions-correction.html' title='Slowly Changing Dimensions - Correction'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdGe2OlJ5L3CNmO4LFr65mmJpLeMTD3xTk-V_wn68qOlKKf6Bwl2sGaHr50TDDJYmEZeCu-WxbFAzge-wpQ2-Ddx6rreDAOAbCbsHd5ETlst5VwHOgfv69xwTucpiN5SF67fwRNQiAsOI/s72-c/ID-10082665.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-2355879872000404943</id><published>2014-04-04T05:00:00.000-07:00</published><updated>2014-04-04T05:00:08.262-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><title type='text'>Factless Fact Tables</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP-etP9D_iFU0DriO8oFCU_e7jpq0Tsqw4_yDViVwPYJ0y6pcdFMhnJoRkBdR1Uo6AFbwOcKaoZztpmzDWNcQczlDBBfqdZAYCwIVfXCryvVgxeHAfdZrXfqPFCBJICDoFjZKLigwEnpU/s1600/ID-10068053.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP-etP9D_iFU0DriO8oFCU_e7jpq0Tsqw4_yDViVwPYJ0y6pcdFMhnJoRkBdR1Uo6AFbwOcKaoZztpmzDWNcQczlDBBfqdZAYCwIVfXCryvVgxeHAfdZrXfqPFCBJICDoFjZKLigwEnpU/s1600/ID-10068053.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Over the past three weeks, we&#39;ve looked at three ways to design fact tables. &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1.) Transaction Fact Table&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2.) Period Snapshot Fact Table&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3.) Accumulating Snapshot Fact Table&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
As the term suggests, all of these tables contain facts (measures) that pertain to the business process. &amp;nbsp;There are instances in which a fact table can be designed to contain no measures but only events. &amp;nbsp;This is referred to as a factless fact table. &amp;nbsp;Consider a user who wishes to see the org chart on a particular day. &amp;nbsp;In this case, a factless fact table may be designed to contain one row per day (if that is the grain) and the keys to the Human Resources descriptors that existed on that day. &amp;nbsp;Every column in this table will contain a foreign key to a dimension table or a degenerate dimension value. &amp;nbsp;Consider this plain-english version of this table:&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 561px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2486; mso-width-source: userset; width: 51pt;&quot; width=&quot;68&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5778; mso-width-source: userset; width: 119pt;&quot; width=&quot;158&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3510; mso-width-source: userset; width: 72pt;&quot; width=&quot;96&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5814; mso-width-source: userset; width: 119pt;&quot; width=&quot;159&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl63&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 51pt;&quot; width=&quot;68&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Date&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Name&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 119pt;&quot; width=&quot;158&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Department&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 72pt;&quot; width=&quot;96&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Supervisor&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 119pt;&quot; width=&quot;159&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Job Title&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;1/15/2013&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Jason Smith&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Human Resources&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Allen Wells&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;HR Associate I&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;…&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;5/31/2013&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Jason Smith&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Human Resources&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Allen Wells&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;HR Benefits
  Coordinator&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;…&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/15/2014&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Jason Smith&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Information
  Technology&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;Mike Williams&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;HR Systems Analyst&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
This tells us that Jason Smith was hired as an HR Associate I on 1/15/2013. &amp;nbsp;He was promoted to a Benefits Coordinator on 5/31/2013 and then moved to Information Technology on 3/15/2014. &amp;nbsp;FYI, although the table above only shows three rows there will probably be several more. &amp;nbsp;This table will probably contain one row per day with the same data until it changes, indicated by the ellipses in the table above.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the future we will look at writing some ETL to populate a factless fact table.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2265&quot; target=&quot;_blank&quot;&gt;watcharakun&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/2355879872000404943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/04/factless-fact-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2355879872000404943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2355879872000404943'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/04/factless-fact-tables.html' title='Factless Fact Tables'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP-etP9D_iFU0DriO8oFCU_e7jpq0Tsqw4_yDViVwPYJ0y6pcdFMhnJoRkBdR1Uo6AFbwOcKaoZztpmzDWNcQczlDBBfqdZAYCwIVfXCryvVgxeHAfdZrXfqPFCBJICDoFjZKLigwEnpU/s72-c/ID-10068053.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-4268223210944126229</id><published>2014-03-28T05:00:00.000-07:00</published><updated>2014-03-28T05:00:05.081-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><title type='text'>Accumulating Snapshot Fact Tables</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-FTtddsxYCchc9Yf7Lya0e8n06wrio5P4fth4ofpDcdG8JS9O6pw-IFo0rWsbyl1FvseNBxZh8IH9VmoFwzx5xM8l-0PxCk1yKYyxwKWdsypZuz2GaA2mCwXuzDfgI85oEX6xbOtxgc/s1600/ID-10060269.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-FTtddsxYCchc9Yf7Lya0e8n06wrio5P4fth4ofpDcdG8JS9O6pw-IFo0rWsbyl1FvseNBxZh8IH9VmoFwzx5xM8l-0PxCk1yKYyxwKWdsypZuz2GaA2mCwXuzDfgI85oEX6xbOtxgc/s1600/ID-10060269.jpg&quot; height=&quot;232&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We&#39;ve been looking at the various fact table design options in data warehousing. &amp;nbsp;Two weeks ago we examined the &lt;a href=&quot;http://valuabledata.blogspot.com/2014/03/transaction-fact-tables.html&quot; target=&quot;_blank&quot;&gt;transaction fact table&lt;/a&gt; and last week we examined the &lt;a href=&quot;http://valuabledata.blogspot.com/2014/03/periodic-snapshot-fact-tables.html&quot; target=&quot;_blank&quot;&gt;periodic snapshot fact table&lt;/a&gt;. &amp;nbsp;The third and final option is called an accumulating snapshot. &amp;nbsp;This type of fact table is different from the other two in one big way. &amp;nbsp;Each row is often revisited. &amp;nbsp;Consider our banking example from the other posts. &amp;nbsp;When a deposit is added to a transaction fact table, that row is added and then left alone. &amp;nbsp;All of the data needed to add and complete that row is known. &amp;nbsp;The same is true of periodic snapshots. &amp;nbsp;An accumulating snapshot fact table begins each row and then accumulates data until that row is complete. &amp;nbsp;Let&#39;s consider an example in a different context. &amp;nbsp;Suppose that a star is built for the purposes of analyzing a help desk ticketing business process. &amp;nbsp;The following descriptors (in addition to any measures) are a part of the business process:&lt;/div&gt;
&lt;br /&gt;
Date Ticket Opened&lt;br /&gt;
Date Ticket Assigned&lt;br /&gt;
Date Solution Provided To Customer&lt;br /&gt;
Date Customer Accepted Solution&lt;br /&gt;
Date Ticket Closed&lt;br /&gt;
Ticket Number&lt;br /&gt;
&lt;br /&gt;
Suppose that ticket number 10012 is opened on 3/1/14. &amp;nbsp;At that point, this row will exist in the fact table:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 489px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2962; mso-width-source: userset; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2816; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3474; mso-width-source: userset; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2157; mso-width-source: userset; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;80&quot; style=&quot;height: 60.0pt;&quot;&gt;
  &lt;td class=&quot;xl67&quot; height=&quot;80&quot; style=&quot;height: 60.0pt; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date
  Ticket Opened&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Assigned&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Solution
  Provided To Customer&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Customer
  Accepted Solution&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Closed&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Ticket Number&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/1/2014&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;10012&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Now, suppose that the ticket is assigned to a technician on 3/3/14. &amp;nbsp;That same row will be updated to look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 489px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2962; mso-width-source: userset; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2816; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3474; mso-width-source: userset; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2157; mso-width-source: userset; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;80&quot; style=&quot;height: 60.0pt;&quot;&gt;
  &lt;td class=&quot;xl67&quot; height=&quot;80&quot; style=&quot;height: 60.0pt; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date
  Ticket Opened&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Assigned&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Solution
  Provided To Customer&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Customer
  Accepted Solution&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Closed&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Ticket Number&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/1/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/3/2014&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;10012&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
If the solution is provided to the customer one day later, the row will be updated to look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 489px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2962; mso-width-source: userset; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2816; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3474; mso-width-source: userset; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2157; mso-width-source: userset; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;80&quot; style=&quot;height: 60.0pt;&quot;&gt;
  &lt;td class=&quot;xl67&quot; height=&quot;80&quot; style=&quot;height: 60.0pt; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date
  Ticket Opened&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Assigned&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Solution
  Provided To Customer&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Customer
  Accepted Solution&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Closed&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Ticket Number&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/1/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/3/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/4/2014&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;10012&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Assuming that the customer accepts the solution on 3/5 and the ticket is closed 3/6, the row will be updated to look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 489px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2962; mso-width-source: userset; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2816; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3474; mso-width-source: userset; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2157; mso-width-source: userset; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;80&quot; style=&quot;height: 60.0pt;&quot;&gt;
  &lt;td class=&quot;xl67&quot; height=&quot;80&quot; style=&quot;height: 60.0pt; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date
  Ticket Opened&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Assigned&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Solution
  Provided To Customer&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Customer
  Accepted Solution&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Closed&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Ticket Number&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/1/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/3/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/4/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/5/2014&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;10012&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
and then this:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 489px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2962; mso-width-source: userset; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2816; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3474; mso-width-source: userset; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3547; mso-width-source: userset; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2925; mso-width-source: userset; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2157; mso-width-source: userset; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;80&quot; style=&quot;height: 60.0pt;&quot;&gt;
  &lt;td class=&quot;xl67&quot; height=&quot;80&quot; style=&quot;height: 60.0pt; width: 61pt;&quot; width=&quot;81&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date
  Ticket Opened&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Assigned&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 71pt;&quot; width=&quot;95&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Solution
  Provided To Customer&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 73pt;&quot; width=&quot;97&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Customer
  Accepted Solution&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 60pt;&quot; width=&quot;80&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Date Ticket
  Closed&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; width: 44pt;&quot; width=&quot;59&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;center&gt;
&lt;b&gt;Ticket Number&lt;/b&gt;&lt;/center&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;3/1/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/3/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/4/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/5/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;3/6/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;10012&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
At this point, the row is left alone. &amp;nbsp;If you so desire, an accumulating snapshot allows you to store some lags between dates to help with analysis. &amp;nbsp;This can help ease the burden of using the database to calculate the various lags.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the future we will look at writing some ETL to populate an accumulating snapshot fact table.&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2023&quot; target=&quot;_blank&quot;&gt;Vichaya Kiatying-Angsulee&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/4268223210944126229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/03/accumulating-snapshot-fact-tables.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4268223210944126229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4268223210944126229'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/03/accumulating-snapshot-fact-tables.html' title='Accumulating Snapshot Fact Tables'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-FTtddsxYCchc9Yf7Lya0e8n06wrio5P4fth4ofpDcdG8JS9O6pw-IFo0rWsbyl1FvseNBxZh8IH9VmoFwzx5xM8l-0PxCk1yKYyxwKWdsypZuz2GaA2mCwXuzDfgI85oEX6xbOtxgc/s72-c/ID-10060269.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-2319050274580857997</id><published>2014-03-21T05:00:00.000-07:00</published><updated>2014-03-21T05:00:06.101-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><title type='text'>Periodic Snapshot Fact Tables</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWQqnpaFnJclUUvh1hSRONIY0Noo4cI2S0IdCE9E5H4oHgy9Z4VXvrHB06emhTrC07qm7pOoox7NAE8PkHSX5GGwO2Dw_alsPFiVASyoatHcZo36g1381f4fZTC4bnwxzlgUMFfdStXxg/s1600/ID-100236049.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWQqnpaFnJclUUvh1hSRONIY0Noo4cI2S0IdCE9E5H4oHgy9Z4VXvrHB06emhTrC07qm7pOoox7NAE8PkHSX5GGwO2Dw_alsPFiVASyoatHcZo36g1381f4fZTC4bnwxzlgUMFfdStXxg/s1600/ID-100236049.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In our &lt;a href=&quot;http://valuabledata.blogspot.com/2014/03/transaction-fact-tables.html&quot; target=&quot;_blank&quot;&gt;last post&lt;/a&gt; we looked at one of three ways to design a fact table, called a transaction fact table. &amp;nbsp;Today, let&#39;s look at a second design, called the periodic snapshot. &amp;nbsp;Remember from Ralph Kimball&#39;s teaching (and last week&#39;s post) that a transaction fact table gains a row each time that something happens. &amp;nbsp;Using our banking example, from last week, each deposit or withdrawal will result in a record being inserted. &amp;nbsp;Looking at only one record will allow us to see that one event. &amp;nbsp;Adding these records will allow us to see the balance.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A periodic snapshot contains snapshots of the data as it existed at various points in time. &amp;nbsp;Unlike a transaction fact table, selecting one row (or perhaps a subset of rows if it is semi-additive) will display the current value at that point. &amp;nbsp;Our example from last week involved opening a checking account at Acme Bank on 2/1/14 and making an initial deposit of $3,000. &amp;nbsp;Three days later you withdrew $200. &amp;nbsp;Five days after that, you deposited $1,000. &amp;nbsp;If a periodic snapshot were written to show the balance at a daily level, a plain-english version may look something like this:&lt;/div&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 118px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2230; mso-width-source: userset; width: 46pt;&quot; width=&quot;61&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2084; mso-width-source: userset; width: 43pt;&quot; width=&quot;57&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl63&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 46pt;&quot; width=&quot;61&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Date&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 43pt;&quot; width=&quot;57&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Amount&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/1/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;$3,000 &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/4/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;$2,800 &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/9/2014&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;$3,800 &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now, let&#39;s use this table to answer the same questions that we examined last week:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;1.) What was the account balance on 2/4?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Unlike the transaction fact table, in order to find the balance on 2/4, we only need to look at the 2/4 row. &amp;nbsp;The 2/4 row contains a snapshot of the current balance on 2/4, as opposed to only the event that occured on 2/4. &amp;nbsp;By looking at the 2/4 row, we will see that the balance was $2,800.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;2.) What was the account balance on 2/9?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Using the same logic that was explained in #1 above, look only at the 2/9 rows. &amp;nbsp;This will give you a value of $3,800.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;3.) How much was deposited on 2/9?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
This type of question cannot be answered using a periodic snapshot. &amp;nbsp;A periodic snapshot will store the current state of the business process as of the applicable period, but will not store the events leading to the current state.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the future we will look at writing some ETL to populate a periodic snapshot fact table. &amp;nbsp;We will also take a look at an additional fact table design.&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2848&quot; target=&quot;_blank&quot;&gt;cooldesign&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/2319050274580857997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/03/periodic-snapshot-fact-tables.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2319050274580857997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2319050274580857997'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/03/periodic-snapshot-fact-tables.html' title='Periodic Snapshot Fact Tables'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWQqnpaFnJclUUvh1hSRONIY0Noo4cI2S0IdCE9E5H4oHgy9Z4VXvrHB06emhTrC07qm7pOoox7NAE8PkHSX5GGwO2Dw_alsPFiVASyoatHcZo36g1381f4fZTC4bnwxzlgUMFfdStXxg/s72-c/ID-100236049.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-1650098974636777041</id><published>2014-03-14T05:00:00.000-07:00</published><updated>2014-03-14T05:00:06.330-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><title type='text'>Transaction Fact Tables</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLHYYTNpd7Q40tB5jlT99vd3_Px2ow3mWwO_0rWZoSwmBbbpyltM3oU4RwTrjz6Vc1FbIp5rANtQTq-TAXfW2MuY1551TMTT90T-2D-phxOT3AVhICBypkVRZocQQRSWK4sVxEeMzfHa4/s1600/ID-100137764.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLHYYTNpd7Q40tB5jlT99vd3_Px2ow3mWwO_0rWZoSwmBbbpyltM3oU4RwTrjz6Vc1FbIp5rANtQTq-TAXfW2MuY1551TMTT90T-2D-phxOT3AVhICBypkVRZocQQRSWK4sVxEeMzfHa4/s1600/ID-100137764.jpg&quot; height=&quot;189&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In his book &lt;i&gt;The Data Warehouse Toolkit&lt;/i&gt;, Ralph Kimball explains that there are three ways to design a fact table. &amp;nbsp;The first and probably most typical (my opinion) is called a transaction fact table. &amp;nbsp;A transaction fact table is a fact table that contains measures, keys to dimension tables, and degenerate dimensions, if applicable. &amp;nbsp;When using this fact table to examine the current state of something going through the business process, all rows should be summed through the latest time period that is being examined. &amp;nbsp;This is due to the fact that a row is added to this fact table as an event in its respective business process occurs. &amp;nbsp;The most common example involves the banking industry. &amp;nbsp;Suppose you open a checking account at Acme Bank on 2/1/14 and make an initial deposit of $3,000. &amp;nbsp;Three days later you withdraw $200. &amp;nbsp;Five days after that, you deposit $1,000. &amp;nbsp;A &quot;plain-english version&quot; of this fact table (without the descriptors) will look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 128px;&quot;&gt;
 &lt;colgroup&gt;&lt;col span=&quot;2&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl63&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Date&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; style=&quot;border-left: none; width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Amount&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/1/2014&amp;nbsp;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;$3,000 &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/4/2014&amp;nbsp;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;($200)&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl64&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;2/9/2014&amp;nbsp;&lt;/td&gt;
  &lt;td align=&quot;right&quot; class=&quot;xl65&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;$1,000 &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;br /&gt;
Now, let&#39;s use this table to answer these very simple questions:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.) What was the account balance on 2/4?&lt;/b&gt;&lt;br /&gt;
Notice how a row was added each time that a deposit or withdrawal was made. &amp;nbsp;In order to find the balance on 2/4, we must look at everything that happened through 2/4. &amp;nbsp;If we only look at the 2/4 row, we will only see the $200 withdrawal. &amp;nbsp;However, it is important to know that $3,000 existed in the account before that withdrawal. &amp;nbsp;So, if we sum the 2/1 row and the 2/4 row, we will see that the balance on 2/4 (after that transaction posted) was $2,800.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.) What was the account balance on 2/9?&lt;/b&gt;&lt;br /&gt;
Using the same logic that was explained in #1 above, sum the 2/1, the 2/4, and the 2/9 rows. &amp;nbsp;This will give you a value of $3,800.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3.) How much was deposited on 2/9?&lt;/b&gt;&lt;br /&gt;
When looking at only one of the events that occured as opposed to the sum of everything that occurred, only that one row should be taken into consideration. &amp;nbsp;The 2/9 row by itself will tell us that $1,000 was deposited into the account. &amp;nbsp;Unlike #2 above, we do not need to consider the $2,800 that was in the account prior to 2/9.&lt;br /&gt;
&lt;br /&gt;
In the future we will look at writing some ETL to populate a transaction fact table. &amp;nbsp;We will also take a look at some additional fact table designs.&lt;br /&gt;
&lt;br /&gt;
Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2020&quot; target=&quot;_blank&quot;&gt;twobee&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/1650098974636777041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/03/transaction-fact-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1650098974636777041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1650098974636777041'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/03/transaction-fact-tables.html' title='Transaction Fact Tables'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLHYYTNpd7Q40tB5jlT99vd3_Px2ow3mWwO_0rWZoSwmBbbpyltM3oU4RwTrjz6Vc1FbIp5rANtQTq-TAXfW2MuY1551TMTT90T-2D-phxOT3AVhICBypkVRZocQQRSWK4sVxEeMzfHa4/s72-c/ID-100137764.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-8826252442812385047</id><published>2014-03-07T05:00:00.000-08:00</published><updated>2014-03-07T06:52:50.117-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><title type='text'>Business Intelligence Yesterday, Today, and Tomorrow</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9iDlau5FY9Hj_LQKBRT8IfyML_FvModHPppShF9Z6nLnINLVBfnvhhCEIbED7CQ7NpOa4NUPO0DzvV8WpD-D4kN8XmYQUtdNphvBm4UBS4tboA3GC1zIa7lT9J6Re45DdBIXbCacTGmI/s1600/ID-100176387.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9iDlau5FY9Hj_LQKBRT8IfyML_FvModHPppShF9Z6nLnINLVBfnvhhCEIbED7CQ7NpOa4NUPO0DzvV8WpD-D4kN8XmYQUtdNphvBm4UBS4tboA3GC1zIa7lT9J6Re45DdBIXbCacTGmI/s1600/ID-100176387.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
They say that the only thing in life that is guaranteed not to change is change itself. &amp;nbsp;The past few decades have proven this to be the case with technology. &amp;nbsp;Old dial-in modems have given way to broadband access. &amp;nbsp;Land line phones have practically been replaced by cell phones. &amp;nbsp;Original flip phones are old news compared to today&#39;s smart phones...you get the idea. &amp;nbsp;The key to navigating these waters is to remember the business that you are in. &amp;nbsp;Both old modems and new modems connect users to an online experience. &amp;nbsp;Land line phones allowed people to remain in touch with each other as do today&#39;s smartphones. &amp;nbsp;In each case, the mechanics may have changed, but the goal remains. Companies that have lost themselves in the mechanics of the technology have a hard time moving to a new one. &amp;nbsp;However, companies that are attached to the overall goal and merely see the technology as today&#39;s way of achieving that goal are often quicker to embrace change...and are able to survive.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
These principles apply to individuals as well. &amp;nbsp;The BI industry is in the midst of some huge change and it is important to remember the goal of BI. &amp;nbsp;The traditional model of ETL jobs running in the middle of the night so that the data in the data warehouse will be available the next day is becoming less and less acceptable. &amp;nbsp;Waiting several minutes for queries to run is becoming less acceptable as well. &amp;nbsp;This has given way to the creation of in-memory database solutions that allow data scientists to analyze large datasets very quickly. &amp;nbsp;The technologies are changing...but the goal is not (check out this &lt;a href=&quot;http://www.kimballgroup.com/2012/09/30/newly-emerging-best-practices-for-big-data/&quot; target=&quot;_blank&quot;&gt;Ralph Kimball white paper&lt;/a&gt;). &amp;nbsp;When considering business intelligence solutions 10 years ago, today, or 10 years from now, one commonality exists. &amp;nbsp;That commonality is the logical architecture. &amp;nbsp;A business process must be understood in terms of its measures and descriptors so that it can be analyzed. &amp;nbsp;A traditional data warehouse will create a place in which the data can physically reside on disk, based on that architecture. &amp;nbsp;Solutions like SAP&#39;s HANA implement that architecture not on disk but in memory. &amp;nbsp;In another decade, or so, another solution may exist.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Those individuals that understand that BI involves presenting the measures and descriptors of the business processes of an organization to its leaders will not only survive but will enjoy these changes. &amp;nbsp;While we BI professionals must learn the mechanics of the best solution of the day in order to practically reach that goal, we also must expect that those mechanics will change.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
What&#39;s the main objective of a BI professional? &amp;nbsp;Not to write ETL. &amp;nbsp;Not to display data using a certain tool. &amp;nbsp;The main objective is to enable the leaders of the organization to make great decisions by providing good data.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2848&quot; target=&quot;_blank&quot;&gt;cooldesign&lt;/a&gt; / &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/8826252442812385047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/03/business-intelligence-yesterday-today.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8826252442812385047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8826252442812385047'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/03/business-intelligence-yesterday-today.html' title='Business Intelligence Yesterday, Today, and Tomorrow'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9iDlau5FY9Hj_LQKBRT8IfyML_FvModHPppShF9Z6nLnINLVBfnvhhCEIbED7CQ7NpOa4NUPO0DzvV8WpD-D4kN8XmYQUtdNphvBm4UBS4tboA3GC1zIa7lT9J6Re45DdBIXbCacTGmI/s72-c/ID-100176387.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-9045478848300083189</id><published>2014-02-28T05:00:00.000-08:00</published><updated>2014-02-28T05:00:09.014-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Conformed Dimensions"/><title type='text'>The Bus Matrix</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzNOrt4rt02NLPv71S5ZLiNLuUCOJFlP5p8NwqFpvQ9c6tCyoLm3VyFfd5Pzl783C_LlfZZe1ShFguAM3CRUi4RT64qpp-P-Hj3IpDhiuIrujSGNIS08mLEIbAIWId82jal46EUBlMZO0/s1600/ID-10087580.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzNOrt4rt02NLPv71S5ZLiNLuUCOJFlP5p8NwqFpvQ9c6tCyoLm3VyFfd5Pzl783C_LlfZZe1ShFguAM3CRUi4RT64qpp-P-Hj3IpDhiuIrujSGNIS08mLEIbAIWId82jal46EUBlMZO0/s1600/ID-10087580.jpg&quot; height=&quot;212&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the invaluable tools that Ralph Kimball describes in his book &lt;i&gt;The Data Warehouse Toolkit&lt;/i&gt; is the bus matrix. &amp;nbsp;The bus matrix is basically a grid that will ultimately allow you to see the relationships between fact tables and their conformed dimensions. &lt;br /&gt;
&lt;br /&gt;
Recall from prior posts that a fact table contains measures (or events for factless fact tables) that pertain to a business process. &amp;nbsp;A dimension table contains the descriptors of those measures. &amp;nbsp;Dimension tables should be reused by multiple fact tables if more than one business process uses that dimension. &amp;nbsp;For example, the salary fact table may describe the payee using the dim_employee dimension table. &amp;nbsp;The help desk ticketing fact table may describe the person to whom a ticket is/was assigned using that same dim_employee dimension table. &amp;nbsp;That concept is explained in &lt;a href=&quot;http://valuabledata.blogspot.com/2012/03/conformed-dimensions.html&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A bus matrix is a two-dimensional grid that lists the business processes (which will become fact tables) along the left and the descriptors (which will become dimension tables) across the top. &amp;nbsp;In the middle, an X or a check mark is placed at the intersection of a fact and dimension that belong in the same star schema. &amp;nbsp; Consider this example:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 461px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 1682; mso-width-source: userset; width: 35pt;&quot; width=&quot;46&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 4973; mso-width-source: userset; width: 102pt;&quot; width=&quot;136&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2523; mso-width-source: userset; width: 52pt;&quot; width=&quot;69&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 2998; mso-width-source: userset; width: 62pt;&quot; width=&quot;82&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt; width: 35pt;&quot; width=&quot;46&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;width: 102pt;&quot; width=&quot;136&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl63&quot; colspan=&quot;4&quot; style=&quot;width: 210pt;&quot; width=&quot;279&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Descriptors&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
Time&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
Employee&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
Vendor&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl66&quot; style=&quot;border-left: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
Department&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl64&quot; height=&quot;80&quot; rowspan=&quot;4&quot; style=&quot;height: 60.0pt; width: 35pt;&quot; width=&quot;46&quot;&gt;&lt;b&gt;Business
  &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Processes&amp;nbsp;&lt;/b&gt;&lt;/td&gt;
  &lt;td class=&quot;xl66&quot;&gt;Payroll&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;Shipping&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;Accounts
  Receivable&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl66&quot; height=&quot;20&quot; style=&quot;border-top: none; height: 15.0pt;&quot;&gt;Sales&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td class=&quot;xl67&quot; style=&quot;border-left: none; border-top: none;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
x&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
When an analyst is gathering requirements in an effort to understand what needs to be warehoused, he can easily list the business processes that come from the conversation along the left of a white board. &amp;nbsp;He can also list the descriptors (i.e., day, person, department, product, etc.) along the top. &amp;nbsp;Later, these items can be translated into table names, resulting in a bus matrix. &lt;br /&gt;
&lt;br /&gt;
Creating a bus matrix is a great idea (thanks to Mr. Kimball for that) for the following reasons:&lt;br /&gt;
&lt;br /&gt;
1.) You can easily see the facts and dimensions that reside in your data warehouse. &amp;nbsp;Entity Relationship Diagrams provide some great information, although they can get pretty large for a large data warehouse. &amp;nbsp;If seeing the relationships at a high level is necessary, a bus matrix will allow that to be done very easily.&lt;br /&gt;
&lt;br /&gt;
2.) As you add to your data warehouse you can revisit this document and add to it. &amp;nbsp;Revisiting the bus matrix will help to ensure that you use the conformed dimensions as opposed to inadvertently re-creating one.&lt;br /&gt;
&lt;br /&gt;
3.) We have been treating the bus matrix as a document that can be used to communicate some of the technical relationships of the data warehouse. &amp;nbsp;That is not a bad use, but consider a version of the bus matrix that simply lists the business processes and descriptors (not their respective tables). &amp;nbsp;Such a document will essentially describe the organization. &amp;nbsp;The business processes and the entities that somehow touch those processes are all displayed visually, giving the executives a high level view of the makeup of their organization.&lt;br /&gt;
&lt;br /&gt;
All of the cool BI that provides flashy new toys begins with working through these fundamentals first. &amp;nbsp;The bus matrix helps the leaders of an organization think through the beginnings of their data management strategy.&lt;br /&gt;
&lt;br /&gt;
Business Intelligence is a great industry with a very bright future. &amp;nbsp;Have fun! &amp;nbsp;Are you interested in entering this industry or do you know somebody who is? &amp;nbsp;Consider &lt;a href=&quot;http://www.brianciampa.com/datawarehouseworkshop.html&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of &lt;a href=&quot;http://www.freedigitalphotos.net/images/view_photog.php?photogid=2888&quot; target=&quot;_blank&quot;&gt;ddpavumba&lt;/a&gt;&amp;nbsp;/ &lt;a href=&quot;http://freedigitalphotos.net/&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/9045478848300083189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2014/02/the-bus-matrix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9045478848300083189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9045478848300083189'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2014/02/the-bus-matrix.html' title='The Bus Matrix'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzNOrt4rt02NLPv71S5ZLiNLuUCOJFlP5p8NwqFpvQ9c6tCyoLm3VyFfd5Pzl783C_LlfZZe1ShFguAM3CRUi4RT64qpp-P-Hj3IpDhiuIrujSGNIS08mLEIbAIWId82jal46EUBlMZO0/s72-c/ID-10087580.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-4946392370329854364</id><published>2012-10-12T04:00:00.000-07:00</published><updated>2013-01-11T07:29:59.631-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Slowly Changing Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="Snowflake Schema"/><title type='text'>Kimball Conference Lessons Learned</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJYZR3_QvGxBeEaam2aReVg_cHMi5ftKyImjY0u8TB0rWGwWL_oVCUWkOO8wBcesNt8wF90N0rdBcWC_lvKzOxgw-oVl8L-VJYj-b2oiJSZ6ca3cOoVds4uQ-9fdd19cwbBLSYX2HxHMI/s1600/ID-10057424.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; mea=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJYZR3_QvGxBeEaam2aReVg_cHMi5ftKyImjY0u8TB0rWGwWL_oVCUWkOO8wBcesNt8wF90N0rdBcWC_lvKzOxgw-oVl8L-VJYj-b2oiJSZ6ca3cOoVds4uQ-9fdd19cwbBLSYX2HxHMI/s200/ID-10057424.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I recently&amp;nbsp;had the distinct privilege of attending Ralph Kimball&#39;s Dimensional Modeling In Depth class, as described in &lt;a href=&quot;http://valuabledata.blogspot.com/2012/10/kimball-university.html&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;. Learning directly from icons such as Ralph Kimball and Margy Ross has been a huge blessing and a very enjoyable experience. &amp;nbsp;One of the most eye-opening (and valuable) experiences has involved tweaking my understanding regarding concepts that I thought I understood...but found that I didn&#39;t. Some of these misunderstandings have even come out in this blog, so I&#39;ll use this post to correct some of those...&lt;br /&gt;
&lt;br /&gt;
1.) Junk Dimensions - The &lt;a href=&quot;http://valuabledata.blogspot.com/2012/06/junk-dimensions.html&quot; target=&quot;_blank&quot;&gt;examples of junk dimensions&lt;/a&gt; that I have provided included the word &quot;junk&quot; in the name. &amp;nbsp;Margy Ross suggests not naming it as such, which makes a lot of sense. &amp;nbsp;Encountering a table with junk in the name may cause some confusion (perhaps even concern) for an analyst who is not well-versed in dimensional modeling.&lt;br /&gt;
&lt;br /&gt;
2.) &lt;span style=&quot;font-family: inherit;&quot;&gt;Snowflake Schema&lt;/span&gt; - The &lt;a href=&quot;http://www.brianciampa.com/Terms.html&quot; target=&quot;_blank&quot;&gt;terms portion of my website&lt;/a&gt; provides the following definition for a snowflake schema&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-text-size-adjust: auto; font-family: &#39;century gothic&#39;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; id=&quot;snowflakeschemamore&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-text-size-adjust: auto; font-family: inherit;&quot;&gt;&lt;em&gt;Occasionally there are reasons to join one dimension table to another dimension table. A schema in which this occurs is referred to as a snowflake schema. The ERD, in this case, will show this “second layer” of dimension tables as being similar in appearance to a snowflake.&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-text-size-adjust: auto;&quot;&gt;&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This dimensional modeling class proved to me that this definition is a bit misleading. &amp;nbsp;Joining one dimension table to another, such as the one on the terms portion of my website, is referred to as an outrigger. &amp;nbsp;A snowflake schema involves an attempt to completely denormalize a dimension.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;3.) Type 3 Slowly Changing Dimension - In &lt;a href=&quot;http://valuabledata.blogspot.com/2012/03/slowly-changing-dimensions.html&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;, I&amp;nbsp;described Type 3 slowly changing dimensions as being a hybrid between type 1 and type 2. &amp;nbsp;In reality, this hybrid is actually referred to as a type 6 (I need to update the other post). &amp;nbsp;So, what is a type 3 slowly changing dimension? &amp;nbsp;I&#39;ll save that explanation for a future post; however, the type 3 is not the hybrid that I thought it was.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
One of the advantages of attending a course like this is that you get to bounce your knowledge against some of the most brilliant minds in the industry.&amp;nbsp; In some cases they help to affirm what you already know.&amp;nbsp; In other cases they correct what you already &quot;know&quot;...which turns you into a stronger asset for your organization and for the industry.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
For more information on data warehousing concepts visit &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;www.brianciampa.com&lt;/a&gt;.&amp;nbsp; For data that can be used to practice modeling and/or ETL, click on Career in Data Warehousing and then click Grow.&amp;nbsp; Also, if you need a fresh approach to marketing your data warehousing skillset, consider &lt;a href=&quot;http://www.brianciampa.com/CareerInDataWarehousing/Succeed.html&quot; target=&quot;_blank&quot;&gt;The Data Warehouse Portfolio&lt;/a&gt;.&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image Courtesy of David Castillo Dominici / FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/4946392370329854364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/10/kimball-conference-lessons-learned.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4946392370329854364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4946392370329854364'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/10/kimball-conference-lessons-learned.html' title='Kimball Conference Lessons Learned'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJYZR3_QvGxBeEaam2aReVg_cHMi5ftKyImjY0u8TB0rWGwWL_oVCUWkOO8wBcesNt8wF90N0rdBcWC_lvKzOxgw-oVl8L-VJYj-b2oiJSZ6ca3cOoVds4uQ-9fdd19cwbBLSYX2HxHMI/s72-c/ID-10057424.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-9155757259602001522</id><published>2012-10-06T13:58:00.000-07:00</published><updated>2012-10-06T14:19:18.802-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><title type='text'>Kimball University</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWTmZi1yhL5rxeNZTz8YJ0QYsqEtlnjwFhPyiRQWZA463So7SgwdYTmVZwyneRswmZ2olqAV3KCxzJmi9iz4KkzqvlLjp0cMtAhtuJm30vxSFJ-VhRRpP2yRZ2M56C2t5vwhoF5SHfaSw/s1600/ID-10036632.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; mea=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWTmZi1yhL5rxeNZTz8YJ0QYsqEtlnjwFhPyiRQWZA463So7SgwdYTmVZwyneRswmZ2olqAV3KCxzJmi9iz4KkzqvlLjp0cMtAhtuJm30vxSFJ-VhRRpP2yRZ2M56C2t5vwhoF5SHfaSw/s320/ID-10036632.jpg&quot; width=&quot;212&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Just as a young quarterback would be thrilled to meet Peyton Manning or a young cook would jump at the chance to meet Paula Dean, I enjoyed that experience this week in the context of my vocation.&amp;nbsp; I sat at the feet of Margy Ross and Ralph Kimball.&amp;nbsp; When you mention these names amongst non-data warehousing professionals, you are often met with confused looks.&amp;nbsp; However, those in the data warehousing arena know these individuals as some of the most brilliant minds when it comes to modeling data.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Margy Ross spent the first two days polishing our skills on some of the more basic pieces of dimensional modeling.&amp;nbsp; She is a very professional yet light-hearted lady with a true talent for teaching these concepts.&amp;nbsp; I was blessed to learn that I had a few things wrong regarding some concepts that I thought I understand.&amp;nbsp; Some of those have even come out in this blog; the corrections for which I&#39;ll save for a future post.&lt;br /&gt;
&lt;br /&gt;
Ralph Kimball spent days three and four going over some advanced concepts with regards to dimensional modeling (and a bit of ETL).&amp;nbsp; He is just as light-hearted, having the ability to explain very complex data warehousing concepts with humor inserted where appropriate.&amp;nbsp; I spent a fair portion of the class laughing, and I still smile as I remember their humor.&amp;nbsp; This was not a dry class, as some would expect (for those who enjoy data warehousing, that is).&amp;nbsp; Both Margy and Ralph are brilliant minds who have the humility to (1) impart some of their knowledge to serious data warehousing students in an interesting way and (2) answer concise questions that apply to your specific organization in a one-on-one setting (assuming you can catch them after class).&amp;nbsp; Here were some of&amp;nbsp;my personal&amp;nbsp;highlights...&lt;br /&gt;
&lt;br /&gt;
1.) Ralph signed my copy of &lt;em&gt;The Data Warehouse Toolkit&lt;/em&gt; by writing &quot;Brian, keep to the grain.&amp;nbsp; Ralph Kimball&quot;.&lt;br /&gt;
&lt;br /&gt;
2.) I&#39;ve had a design conundrum at work regarding a many-to-many problem related to &lt;a href=&quot;http://valuabledata.blogspot.com/2012/09/bridge-tables.html&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;.&amp;nbsp; I asked him about it after class and he affirmed my suggested solution.&lt;br /&gt;
&lt;br /&gt;
3.) Ralph began his first class on day three by explaining the way in which a data warehouse developer will begin asking a user what needs to exist in that user&#39;s data warehouse (which does not involve asking the question in that exact way).&amp;nbsp;&amp;nbsp;As a part of that&amp;nbsp;conversation, Ralph made an example out of yours truly, as though I were a successful account manager looking to implement a data warehouse. Of course he was painting a fictitious scenario to make his point but it was still a cool moment.&lt;br /&gt;
&lt;br /&gt;
I would highly recommend the &lt;a href=&quot;http://www.kimballgroup.com/wp-content/uploads/2012/08/Kimball-University-Dimensional-Modeling-in-Depth-Course-Description.pdf&quot; target=&quot;_blank&quot;&gt;Dimensionsal Modeling In Depth course&lt;/a&gt; to anybody interested in the data warehousing arena.&amp;nbsp; I&#39;m not affiliated with the &lt;a href=&quot;http://www.kimballgroup.com/&quot; target=&quot;_blank&quot;&gt;Kimball Group&lt;/a&gt; in any way (other than being a fan) so I will not profit by anybody taking the course.&amp;nbsp; I recommend it because it is simply that good. &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of&amp;nbsp;smokedsalmon / FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/9155757259602001522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/10/kimball-university.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9155757259602001522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9155757259602001522'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/10/kimball-university.html' title='Kimball University'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWTmZi1yhL5rxeNZTz8YJ0QYsqEtlnjwFhPyiRQWZA463So7SgwdYTmVZwyneRswmZ2olqAV3KCxzJmi9iz4KkzqvlLjp0cMtAhtuJm30vxSFJ-VhRRpP2yRZ2M56C2t5vwhoF5SHfaSw/s72-c/ID-10036632.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-6717749181137840826</id><published>2012-09-28T04:00:00.000-07:00</published><updated>2012-09-28T04:00:18.497-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><title type='text'>Data Extraction Techniques</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpSfsWSqQUgmCfRtEL-DnTzlgXg1GbqXoMZ1pTc2NIaN5eoh5IWQwbkTlapiiKeCpKbD4g78tRDPPrEJE_HQ_vFJ3XLq1a5f2aV0JghaaBhwaK8mypmFoCaLnTlPQ3RIWJP7ENqUJvDMw/s1600/ID-10041508.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; kea=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpSfsWSqQUgmCfRtEL-DnTzlgXg1GbqXoMZ1pTc2NIaN5eoh5IWQwbkTlapiiKeCpKbD4g78tRDPPrEJE_HQ_vFJ3XLq1a5f2aV0JghaaBhwaK8mypmFoCaLnTlPQ3RIWJP7ENqUJvDMw/s320/ID-10041508.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the challenges of writing ETL involves deciding which records to pull from the source system.&amp;nbsp; If a salary star schema is built to contain payroll data, then the ETL job will refresh on a recurring basis to add new data to that star.&amp;nbsp; If some data related to salary dollars already exists in the star and some new data makes it into the source system, how can the ETL job know to load the new data into the star and avoid reloading the records that were previously loaded (since they already exist in the data warehouse)?&amp;nbsp; There is no one way of doing this, but consider these options...&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1.)&lt;/strong&gt; &lt;strong&gt;Use the source system&#39;s datetime stamps&lt;/strong&gt; - An ETL developer should consider himself very blessed if his source system contains an insert and update datetime stamp for each record in the system.&amp;nbsp; If this is the case, then he can simply store the date and time of the most recent successful extract and then pull everything that has been inserted or updated since then.&amp;nbsp; It will be important for the ETL developer to understand how those audit columns are populated in each table to make sure that necessary data will not be left out and unnecessary data will not be included due to odd occurances (i.e., a source system table is reloaded for some reason and records that pertain to data that was initially added three years ago have yesterday&#39;s timestamp, etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2.)&lt;/strong&gt; &lt;strong&gt;Compare to the prior extract&lt;/strong&gt; - In his book &lt;em&gt;The Data Warehouse ETL Toolkit : Practical Techniques for Extracting, Cleaning, Conforming, and Delivering Data&lt;/em&gt;, Ralph Kimball suggests always saving the prior extract in the staging area.&amp;nbsp; A new extract can be compared to this prior extract and the differences will be uploaded.&amp;nbsp; Finally the new extract will overwrite the prior extract and be used as the baseline for the next update.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;3.)&lt;/strong&gt; &lt;strong&gt;Always pull as of a certain date&lt;/strong&gt; - In this approach, the salary dollars may always be extracted for the current calendar year (for example).&amp;nbsp; So, as the year goes on each extraction will be slightly larger than the last.&amp;nbsp; In April, all salary dollars that date back to January will be extracted from the source.&amp;nbsp; In May, all salary dollars that date back to January will be extracted from the source as well.&amp;nbsp; When using this option in conjunction with loading a fact table, the ETL developer will need to delete all of the applicable year&#39;s records from the fact table and then load the extract.&amp;nbsp; Although several records will be deleted and simply reloaded (with no change), this is one way of grabbing what is needed from the source when a simpler solution is not possible.&amp;nbsp; However, any updates made to the data that pertain to a different year will be missed.&amp;nbsp; This will need to be taken into consideration.&amp;nbsp; When using this option in conjunction with loading a dimension table, the ETL developer will need to compare to the dimension table to see if any of the dimensions have changed and only load or update the changes.&amp;nbsp; Deleting records from the dimension table and reloading is not a good strategy since the fact table has foreign keys that reference the dimension table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;4.) Refresh the fact table&lt;/strong&gt; - In this case all of the data from the source system will always be extracted and the fact table will be truncated and reloaded each time.&amp;nbsp; This will only be an acceptable solution if the fact table can be loaded in a timely fashion.&amp;nbsp; Also, this will only be acceptable with a fact table most of the time.&amp;nbsp; Even if an ETL developer plans to refresh an entire star (fact and dimension tables) she must consider the possibility that some of these dimensions are conformed dimensions, meaning that other fact tables reference them.&lt;br /&gt;
&lt;br /&gt;
There are obviously more options than these four.&amp;nbsp; With whatever option you choose, it is important to build the job so that it can be run multiple times with no negative impact.&amp;nbsp; In other words, running the job twice should not result in duplicate records showing up.&amp;nbsp; Even though the initial extract may place more records than are needed into the staging area, the job should be &quot;smart enough&quot; to know exactly what to load into the data warehouse and what to exclude.&lt;br /&gt;
&lt;br /&gt;
For more information on data warehousing techniques as well as data with which you can practice writing your own ETL, visit &lt;a href=&quot;http://www.brianciampa.com/careerindatawarehousing/grow.html&quot;&gt;www.brianciampa.com/careerindatawarehousing/grow.html&lt;/a&gt;.&amp;nbsp; Also, if you need a fresh approach to marketing your skillset, consider &lt;a href=&quot;http://www.brianciampa.com/CareerInDataWarehousing/Succeed.html&quot; target=&quot;_blank&quot;&gt;The Data Warehouse Portfolio&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image courtesy of&amp;nbsp;digitalart /&amp;nbsp;&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;FreeDigitalPhotos.net&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/6717749181137840826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/data-extraction-techniques.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/6717749181137840826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/6717749181137840826'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/data-extraction-techniques.html' title='Data Extraction Techniques'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpSfsWSqQUgmCfRtEL-DnTzlgXg1GbqXoMZ1pTc2NIaN5eoh5IWQwbkTlapiiKeCpKbD4g78tRDPPrEJE_HQ_vFJ3XLq1a5f2aV0JghaaBhwaK8mypmFoCaLnTlPQ3RIWJP7ENqUJvDMw/s72-c/ID-10041508.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-309803667732355495</id><published>2012-09-21T04:00:00.000-07:00</published><updated>2012-09-21T04:00:04.736-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><title type='text'>To Constrain or Not Constrain</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUXVjT7yANcKatoYs4zWXmzfPPCb6LwogeKy-tJo37oSZwl3bENItGCGc5gYl9m1v-gdy5ogj6zvw0HXxoGzaN-MgPAii64nHppelSNFHxqA7h_qLnLbUMTijVT_IoRR5VYsN2-WtlhMI/s1600/ID-10070280.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUXVjT7yANcKatoYs4zWXmzfPPCb6LwogeKy-tJo37oSZwl3bENItGCGc5gYl9m1v-gdy5ogj6zvw0HXxoGzaN-MgPAii64nHppelSNFHxqA7h_qLnLbUMTijVT_IoRR5VYsN2-WtlhMI/s320/ID-10070280.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
One of the advantages of using a relational database is that you can mandate that certain relationships MUST exist within your data.&amp;nbsp; If somebody tries to enter data into the database that does not relate to other data correctly, the database can be configured to reject that &quot;bad data&quot; until it is corrected.&amp;nbsp; Since many data warehouses reside in relational databases, using this feature is an option for the data warehousing team as well.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Consider this example...suppose that a star contains a DIM_PRODUCT table that contains the products that are used by that business process.&amp;nbsp; If the Men&#39;s Raincoat product has a KEY_PRODUCT value of 27 (surrogate key) then the records in the corresponding fact tables that pertain to this product will have a KEY_PRODUCT value of 27 (foreign key).&amp;nbsp; That&#39;s a lesson from Database 101.&amp;nbsp; If somebody removes the Men&#39;s Raincoat product from the DIM_PRODUCT table while records that point to it exist in the fact table, then those fact table records will point to nothing...and become meaningless.&lt;br /&gt;
&lt;br /&gt;
The advantage of enforcing this constraint within the database itself is that if somebody tries to remove the Men&#39;s Raincoat product from the DIM_PRODUCT table the database will not allow it until the &quot;child records&quot; from the fact table have been deleted or repointed.&amp;nbsp; Using this feature sounds like a no-brainer (and it may be) but a data warehouse provides an additional twist to this kind of decision since so much data is being inserted.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Option 1: Enforce Constraints - &lt;/strong&gt;This will ensure that the relationship between the fact and dimension tables are always valid from a technical perspective.&amp;nbsp; However, each time that the data is loaded via the ETL job,&amp;nbsp;the fact table must look to make sure that a parent record exists in the dimension.&amp;nbsp; If (and only if) it exists, it will load that record into the fact.&amp;nbsp; Doing that for each and every&amp;nbsp;record will ensure good data intregity but it can also slow a job down.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Option 2: Do Not Enforce Constraints - &lt;/strong&gt;This will probably result in a faster and more efficient ETL job.&amp;nbsp; However, the possiblity of the fact table containing some orphan records exists.&lt;br /&gt;
&lt;br /&gt;
It is up to each data warehousing team to decide which is best for their particular situation.&amp;nbsp; In some cases it is appropriate to physically enforce constraints (option 1).&amp;nbsp; In other cases, it may be appropriate to logically enforce constraints (option 2), meaning that the data warehousing team will need to periodically run SQL statements that specifically look for orphaned records.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
If you are looking for more information on data warehousing and/or data that can be used to practice ETL and architecture skills, visit &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;www.brianciampa.com&lt;/a&gt; and click on Career in Data Warehousing.&amp;nbsp; Also, if you are looking for a fresh way to market your data warehousing skills, consider &lt;a href=&quot;http://www.brianciampa.com/CareerInDataWarehousing/Succeed.html&quot; target=&quot;_blank&quot;&gt;The Data Warehouse Portfolio&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image: FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/309803667732355495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/to-constrain-or-not-constrain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/309803667732355495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/309803667732355495'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/to-constrain-or-not-constrain.html' title='To Constrain or Not Constrain'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUXVjT7yANcKatoYs4zWXmzfPPCb6LwogeKy-tJo37oSZwl3bENItGCGc5gYl9m1v-gdy5ogj6zvw0HXxoGzaN-MgPAii64nHppelSNFHxqA7h_qLnLbUMTijVT_IoRR5VYsN2-WtlhMI/s72-c/ID-10070280.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-2757049872793409612</id><published>2012-09-14T04:02:00.000-07:00</published><updated>2012-09-20T15:56:41.844-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bridge Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Snowflake Schema"/><title type='text'>Bridge Tables</title><content type='html'>Each of the examples that we&#39;ve used thus far in this blog have involved situations in which each fact row was associated with only on dimension row, per dimension table.&amp;nbsp; In other words there has always been a many-to-one relationship between the fact table and its associated dimensions.&amp;nbsp; In the real world, this relationship&amp;nbsp;will not always be the case.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Suppose that a fact table contains employee salary data and each employee can be associated with multiple departments at once.&amp;nbsp; Conceptually, the design would be something like this...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiS6ZTOOCYZK1bHUUAm5nvGzTC-YZEOaSDqp7Ll5un4zrdfCyyEoNqmjEb4eKpvdlMvUpVV5LtD7ZdiNpfV4HnABXbouivVeoCqSvPOn_TAfLfKuceX7YRAqO8EI49KeeSmTkvP0H-39o/s1600/Many+To+Many+Picture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;105&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiS6ZTOOCYZK1bHUUAm5nvGzTC-YZEOaSDqp7Ll5un4zrdfCyyEoNqmjEb4eKpvdlMvUpVV5LtD7ZdiNpfV4HnABXbouivVeoCqSvPOn_TAfLfKuceX7YRAqO8EI49KeeSmTkvP0H-39o/s320/Many+To+Many+Picture.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
One possible way of resolving this is to use what some people call a bridge table.&amp;nbsp; This is essentially a crosswalk between the fact and dimension designed to resolve the many-to-many problem.&amp;nbsp; The design for such a table is below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigm6Vto8Qu2ZRJrdXHcSkJzFqQZ9is_rHXTDbk65OTxxLMPAsSw7joZCW9FdaamZ9X8jxZszUCskmuicvn7UIB6TIU9_3A1yQchF5BwZ_Vm5lG8mgZg36ej5jmdJ3kaDv4sMGGUTXdwSM/s1600/Bridge+Table+Picture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;64&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigm6Vto8Qu2ZRJrdXHcSkJzFqQZ9is_rHXTDbk65OTxxLMPAsSw7joZCW9FdaamZ9X8jxZszUCskmuicvn7UIB6TIU9_3A1yQchF5BwZ_Vm5lG8mgZg36ej5jmdJ3kaDv4sMGGUTXdwSM/s320/Bridge+Table+Picture.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The EMPLOYEE_DEPT_BRIDGE table will not contain any data that will be seen in query results.&amp;nbsp; It will only be used as a link between the FACT_SALARY and the DIM_DEPARTMENT tables.&amp;nbsp; However, there is a&amp;nbsp;rule that&amp;nbsp;must be well understood by any and all analysts that select from this table: &lt;strong&gt;You must always group by the&amp;nbsp;department&amp;nbsp;in your query results if your select statement joins to the DIM_DEPARTMENT table (via the bridge, of course)&amp;nbsp;in any way.&lt;/strong&gt;&amp;nbsp; For example, suppose that John Smith (KEY_EMPLOYEE value is 123) has $1,000 in&amp;nbsp;wages and is associated with both accounting and human resources (part time in each, perhaps).&amp;nbsp; Consider this SQL statement...&lt;br /&gt;
&lt;br /&gt;
select a.key_employee_name,&lt;br /&gt;
sum(a.wage_amount)&lt;br /&gt;
from fact_salary a,&lt;br /&gt;
employee_dept_bridge b,&lt;br /&gt;
dim_department c&lt;br /&gt;
where a.key_employee = b.key_employee&lt;br /&gt;
and b.key_department = c.key_department&lt;br /&gt;
and a.key_employee = 123&lt;br /&gt;
group by a.key_employee_name&lt;br /&gt;
&lt;br /&gt;
Because the EMPLOYEE_DEPT_BRIDGE table will contain two rows for John Smith (one for accounting and one for human resources), these results will show a salary of $2,000 which will appear incorrect to the user.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 315px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 4900; mso-width-source: userset; width: 101pt;&quot; width=&quot;134&quot;&gt;&lt;/col&gt;&lt;col style=&quot;mso-width-alt: 6619; mso-width-source: userset; width: 136pt;&quot; width=&quot;181&quot;&gt;&lt;/col&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl67&quot; height=&quot;20&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; height: 15pt; width: 101pt;&quot; width=&quot;134&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;KEY_EMPLOYEE&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;xl67&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; width: 136pt;&quot; width=&quot;181&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;SUM(A.WAGE_AMT)&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; border-top: windowtext; height: 15pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;123&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/colgroup&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, consider this SQL statement...&lt;br /&gt;
&lt;br /&gt;
select a.key_employee_name,&lt;br /&gt;
department_name,&lt;br /&gt;
sum(a.wage_amount)&lt;br /&gt;
from fact_salary a,&lt;br /&gt;
employee_dept_bridge b,&lt;br /&gt;
dim_department c&lt;br /&gt;
where a.key_employee = b.key_employee&lt;br /&gt;
and b.key_department = c.key_department&lt;br /&gt;
and a.key_employee = 123&lt;br /&gt;
group by a.key_employee_name,&lt;br /&gt;
department_name&lt;br /&gt;
&lt;br /&gt;
The results will show his $1,000 salary associated with each department.&amp;nbsp; This will appear to be more correct to the user, assuming they understand that he is associated with both departments.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 473px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 5120; mso-width-source: userset; width: 105pt;&quot; width=&quot;140&quot;&gt;&lt;/col&gt;&lt;col style=&quot;mso-width-alt: 6400; mso-width-source: userset; width: 131pt;&quot; width=&quot;175&quot;&gt;&lt;/col&gt;&lt;col style=&quot;mso-width-alt: 5778; mso-width-source: userset; width: 119pt;&quot; width=&quot;158&quot;&gt;&lt;/col&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td class=&quot;xl67&quot; height=&quot;20&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; height: 15pt; width: 105pt;&quot; width=&quot;140&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;KEY_EMPLOYEE&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;xl67&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; width: 131pt;&quot; width=&quot;175&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;DEPARTMENT_NAME&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;xl67&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; width: 119pt;&quot; width=&quot;158&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;SUM(A.WAGE_AMT)&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; border-top: windowtext; height: 15pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;123&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;ACCOUNTING&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15pt;&quot;&gt;&lt;td align=&quot;right&quot; class=&quot;xl65&quot; height=&quot;20&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; border-top: windowtext; height: 15pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;123&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;HUMAN RESOURCES&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;xl66&quot; style=&quot;background-color: transparent; border-bottom: windowtext 0.5pt solid; border-left: windowtext; border-right: windowtext 0.5pt solid; border-top: windowtext;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1,000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/colgroup&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, educating your analysts and report writers to use this table correctly is a key component to the success of this design.</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/2757049872793409612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/bridge-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2757049872793409612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2757049872793409612'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/bridge-tables.html' title='Bridge Tables'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiS6ZTOOCYZK1bHUUAm5nvGzTC-YZEOaSDqp7Ll5un4zrdfCyyEoNqmjEb4eKpvdlMvUpVV5LtD7ZdiNpfV4HnABXbouivVeoCqSvPOn_TAfLfKuceX7YRAqO8EI49KeeSmTkvP0H-39o/s72-c/Many+To+Many+Picture.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-9093043780141762505</id><published>2012-09-07T04:00:00.000-07:00</published><updated>2012-09-20T15:58:33.019-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Hands-on Practice"/><title type='text'>ETL - Practice Loading A Fact - Solution</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9IKQdO7sUUVHB75jjZXlc2oIVmM9u3f-fa9VPr9vJzn1RDeCifLyEVvgNJIOrM2zc64cNHUXEbCReTcQLj2OVyA7_594bMagC5ePaxyAXE2I52h2wbAceH9NgD2xgBzSTVx75m9VNse8/s1600/Hammer+Resting+on+Nail.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9IKQdO7sUUVHB75jjZXlc2oIVmM9u3f-fa9VPr9vJzn1RDeCifLyEVvgNJIOrM2zc64cNHUXEbCReTcQLj2OVyA7_594bMagC5ePaxyAXE2I52h2wbAceH9NgD2xgBzSTVx75m9VNse8/s320/Hammer+Resting+on+Nail.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In a &lt;a href=&quot;http://valuabledata.blogspot.com/2012/09/etl-practice-loading-fact.html&quot; target=&quot;_blank&quot;&gt;prior post&lt;/a&gt; we looked at the process by which a fact table is loaded.&amp;nbsp; I need to apologize, since the ERD of the FACT_TRANSACTION table that I posted in that prior post was incorrect.&amp;nbsp; It has since been updated.&amp;nbsp; The four things that an ETL job needs to accomplish are...&lt;br /&gt;
&lt;br /&gt;
1.) Select all necessary data from the source&lt;br /&gt;
&amp;nbsp;a. Measures &lt;br /&gt;
&amp;nbsp;b. Natural Keys of the dimension objects&lt;br /&gt;
&amp;nbsp;c. Degenerate Dimension objects&lt;br /&gt;
2.) Transform the data as needed&lt;br /&gt;
&amp;nbsp;a. Aggregate measures and group by the appropriate objects&lt;br /&gt;
&amp;nbsp;b. Add foreign keys to dimension tables&lt;br /&gt;
3.) Delete any existing rows from the fact table that will be replaced by the new data&lt;br /&gt;
4.) Load the fact table&lt;br /&gt;
&lt;br /&gt;
Consider &lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/LOAD_TRANSACTION_FACT.SQL?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;this PL/SQL procedure&lt;/a&gt; as a procedure that will accomplish these things.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Extract&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The STAGE_TRANSACTION_DATA table pulls all of the necessary elements from the source system into the staging area.&amp;nbsp; I am treating one schema as both the staging area and the presentation area.&amp;nbsp; This is probably unrealistic in a production environment but it keeps things simple for these purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Transform&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1.) The STAGE_TRANS_DATA_PROD_KEY table is used to grab the KEY_PRODUCT from the DIM_PRODUCT dimension.&amp;nbsp; Notice that this is done by joining the product&#39;s natural key, which is the PRODUCT_NO (product number), to the DIM_PRODUCT table.&amp;nbsp; An outerjoin is used so that if a record comes into the staging area for a product that does not exist in the DIM_PRODUCT table, that record will not be excluded from the fact table.&amp;nbsp; It will exist with a value of -1 and will need to be addressed after the ETL has run.&lt;br /&gt;
&lt;br /&gt;
2.) The STAGE_TRANS_DATA_DATE_KEY table is used to transform the TRANSACTION_DATE into a key that will join to a date dimension.&amp;nbsp; I created the date dimension on my own, so I&#39;ll let you try and tackle that one.&amp;nbsp; Those dimensions typically have no source and are created as needed by the ETL developer.&amp;nbsp; Again, an outer join is used so that if a date does not exist in that dimension a value of -1 is placed into the fact table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Load&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1.) This fact table, because it is so small, is truncated and then repopulated each time that the ETL runs.&amp;nbsp; Date logic can be written so that only a certain time period will be refreshed with each run, but for simplicity&#39;s sake I did it this way.&lt;br /&gt;
&lt;br /&gt;
2.) Finally, the data is loaded into the FACT_TRANSACTION table.&lt;br /&gt;
&lt;br /&gt;
Prior posts have talked about turning data into valuable data.&amp;nbsp; This post shows you how to accomplish that in a hands-on way.&lt;br /&gt;
&lt;br /&gt;
Remember to take a look at &lt;a href=&quot;http://www.brianciampa.com/&quot; target=&quot;_blank&quot;&gt;www.brianciampa.com&lt;/a&gt; (specifically, click on Career In Data Warehousing and then Grow) for larger datasets that can be used for this kind of practice.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net./&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image: FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/9093043780141762505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/etl-practice-loading-fact-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9093043780141762505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/9093043780141762505'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/etl-practice-loading-fact-solution.html' title='ETL - Practice Loading A Fact - Solution'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9IKQdO7sUUVHB75jjZXlc2oIVmM9u3f-fa9VPr9vJzn1RDeCifLyEVvgNJIOrM2zc64cNHUXEbCReTcQLj2OVyA7_594bMagC5ePaxyAXE2I52h2wbAceH9NgD2xgBzSTVx75m9VNse8/s72-c/Hammer+Resting+on+Nail.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-980294386401518265</id><published>2012-09-05T03:38:00.000-07:00</published><updated>2012-09-20T15:58:57.123-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Job Search"/><title type='text'>Tales of Work</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmFJZWNAKQ-c_TOtCZfTBQgDcnX2W71dgtfON1wkq_77enlnf81VauMhAN3LSbID72zJq7bJ5SvyH3h6d2Fj6zJjwXAEfAluNbPtQCj2OxM-p3dNfvpwe-VaSWVLu-phegKeADXhLzxs/s1600/Portfolio.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;175&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmFJZWNAKQ-c_TOtCZfTBQgDcnX2W71dgtfON1wkq_77enlnf81VauMhAN3LSbID72zJq7bJ5SvyH3h6d2Fj6zJjwXAEfAluNbPtQCj2OxM-p3dNfvpwe-VaSWVLu-phegKeADXhLzxs/s200/Portfolio.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I typically do not blog in the middle of the week, but this week I&#39;ll make an exception.&amp;nbsp; Kimanzi Constable is a career coach who maintains a great blog, called &lt;a href=&quot;http://talesofwork.com/blog&quot; target=&quot;_blank&quot;&gt;Tales of Work&lt;/a&gt;, on discovering your talents and finding work that you enjoy.&amp;nbsp; He has been gracious enough to run a guest post that I wrote on the portfolio concept.&amp;nbsp; You can check out the &lt;a href=&quot;http://talesofwork.com/blog/stand-out-and-get-that-job/&quot; target=&quot;_blank&quot;&gt;guest post here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
My blog is built on the premise that data warehousing and business intelligence are about helping decision makers to see the true value in their data.&amp;nbsp; Those decision makers are best helped by those who are passionate about data.&amp;nbsp; That best describes me, which is why I maintain the Valuable Data blog in hopes of helping other passionate people to hone that skill.&amp;nbsp; If you find yourself needing some help in finding your passion, consider the Tales of Work blog.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image: Courtesy of FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/980294386401518265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/tales-of-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/980294386401518265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/980294386401518265'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/tales-of-work.html' title='Tales of Work'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmFJZWNAKQ-c_TOtCZfTBQgDcnX2W71dgtfON1wkq_77enlnf81VauMhAN3LSbID72zJq7bJ5SvyH3h6d2Fj6zJjwXAEfAluNbPtQCj2OxM-p3dNfvpwe-VaSWVLu-phegKeADXhLzxs/s72-c/Portfolio.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-1334387121995805382</id><published>2012-09-02T04:37:00.000-07:00</published><updated>2012-09-20T15:59:27.643-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Hands-on Practice"/><title type='text'>ETL - Practice Loading A Fact</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;We &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;looked recently&lt;/a&gt; at the process used to load a dimension table.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Consider this post as a way to practice loading a fact table.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;An ETL job that is designed to load a fact table will accomplish these things…&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1.)&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Select all necessary data from the source&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;a.&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Measures &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;b.&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Natural Keys of the dimension objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;c.&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Degenerate Dimension objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2.)&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Transform the data as needed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;a.&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Aggregate measures and group by the appropriate objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;b.&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Add foreign keys to dimension tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3.)&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Delete any existing rows from the fact table that will be replaced by the new data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.)&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;Load the fact table&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;As with the dimension example, no two developers will do this the same way, which is perfectly fine.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Consider this example which is to be used in conjunction with the two tables used in the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;ETL – Practice Loading a Dimension&lt;/a&gt; post (click on the image to enlarge it)…&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh7weapSE1agflMSBgstM8y7wPXMK9Gl2vxCBxQ-vMCmII2gWcZXPRMdD_nfEXXkzKvLnn8PIwAqdHYqROpAg28zLAEQhZVXC5MFgIXKcY-o_cMi4hFCjVjwQQZa6xAEztFjYnvXFjb3k/s1600/Transaction_Data_Source_Tables.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; fea=&quot;true&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh7weapSE1agflMSBgstM8y7wPXMK9Gl2vxCBxQ-vMCmII2gWcZXPRMdD_nfEXXkzKvLnn8PIwAqdHYqROpAg28zLAEQhZVXC5MFgIXKcY-o_cMi4hFCjVjwQQZa6xAEztFjYnvXFjb3k/s320/Transaction_Data_Source_Tables.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;…and this fact table needs to be populated.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvbzRdjdOvFHvHAen2C-ArKaB0evLV8XyibPqakxMxsoOPAcqgbZYhTLDpV0-8LhyphenhyphenOOlYpGc-O9hk_MhoDNtaVt7ZXJtkpk87NOkTLfCH4x9LeWNJr83I4-RCkFl2hSOq7Z9NJkkKUMLE/s1600/FACT_TRANSACTION+ERD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; hea=&quot;true&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvbzRdjdOvFHvHAen2C-ArKaB0evLV8XyibPqakxMxsoOPAcqgbZYhTLDpV0-8LhyphenhyphenOOlYpGc-O9hk_MhoDNtaVt7ZXJtkpk87NOkTLfCH4x9LeWNJr83I4-RCkFl2hSOq7Z9NJkkKUMLE/s320/FACT_TRANSACTION+ERD.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Run the following scripts in Oracle to create the source data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1.)&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/Product_ETL_Data.sql?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;Product data&lt;/a&gt; – This is the same script from the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;ETL – Practice Loading a Dimension&lt;/a&gt; post.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;If you have already run this one, you are fine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2.)&lt;/span&gt;&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/Transaction_Data_For_ETL.sql?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;Transaction data&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&amp;nbsp;- This script will create and populate the TRANSACTION_HEADER and TRANSACTION_DETAIL tables above.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;The TRANSACTION_DETAIL.PRODUCT_ID is a foreign key to the PRODUCT.ID field from the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;ETL – Practice Loading a Dimension&lt;/a&gt; post.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;If you wish, try to write an ETL job that will populate the FACT_TRANSACTION table in PL/SQL or another language of your choosing.&amp;nbsp; We will examine a possible solution in a future post.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;For more practice data and additional information on dimensional modeling visit &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;www.brianciampa.com&lt;/a&gt;.&amp;nbsp; Also, if you need a fresh approach to marketing your data warehousing skillset consider &lt;em&gt;&lt;a href=&quot;http://www.amazon.com/-/e/B008S9FWEE&quot; target=&quot;_blank&quot;&gt;The Data Warehouse Portfolio&lt;/a&gt;&lt;/em&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/1334387121995805382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/09/etl-practice-loading-fact.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1334387121995805382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1334387121995805382'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/09/etl-practice-loading-fact.html' title='ETL - Practice Loading A Fact'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh7weapSE1agflMSBgstM8y7wPXMK9Gl2vxCBxQ-vMCmII2gWcZXPRMdD_nfEXXkzKvLnn8PIwAqdHYqROpAg28zLAEQhZVXC5MFgIXKcY-o_cMi4hFCjVjwQQZa6xAEztFjYnvXFjb3k/s72-c/Transaction_Data_Source_Tables.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-5540033637670254245</id><published>2012-08-25T04:08:00.001-07:00</published><updated>2012-09-20T16:00:16.661-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Fact Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Star Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="Videos"/><title type='text'>Dimensional Modeling Video</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;http://www.youtube.com/embed/FLN4PDqFp0s?fs=1&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Dimensional modeling is a very powerful technique in helping to enable excellent decision making.&amp;nbsp; This is a video that explains the business value that can be derived from using this technique.&amp;nbsp; For more information on dimensional modeling, including free data with which you can practice, look at the Learn, Grow, and Succeed links at &lt;a href=&quot;http://www.brianciampa.com/careerindatawarehousing.html&quot; target=&quot;_blank&quot;&gt;http://www.brianciampa.com/careerindatawarehousing.html&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Also, for those looking for a fresh way to market your skillset consider &lt;em&gt;The Data Warehouse Portfolio&lt;/em&gt; at &lt;a href=&quot;http://www.brianciampa.com/&quot; target=&quot;_blank&quot;&gt;http://www.brianciampa.com&lt;/a&gt;.&amp;nbsp; </content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/5540033637670254245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/08/dimensional-modeling-video.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/5540033637670254245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/5540033637670254245'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/08/dimensional-modeling-video.html' title='Dimensional Modeling Video'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/FLN4PDqFp0s/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-2493839984549680378</id><published>2012-08-17T04:19:00.000-07:00</published><updated>2012-09-20T16:00:42.181-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Job Search"/><title type='text'>The Data Warehouse Portfolio</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSYKEdC4KsB3Ojb3ZCBBV3CThiFq5Jru93eKvX2vjoteSWwkzong8iMzurEbTG-qiMmeF-O-nq4TO0CijHi9RQNkJnH5ja7nxsl7-in3jnn2rtQC8tCJiaMDwToOXU56Q5mTaxacz9qc/s1600/DWH+Portfolio+Cover.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSYKEdC4KsB3Ojb3ZCBBV3CThiFq5Jru93eKvX2vjoteSWwkzong8iMzurEbTG-qiMmeF-O-nq4TO0CijHi9RQNkJnH5ja7nxsl7-in3jnn2rtQC8tCJiaMDwToOXU56Q5mTaxacz9qc/s320/DWH+Portfolio+Cover.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You&#39;ve spent weeks in data warehousing classes, days in training sessions, hours reading books on the subject, and perhaps years warehousing data for other organizations.&amp;nbsp; However, right now you want to work for this one.&amp;nbsp; You know that you have the experience as well as the ambition.&amp;nbsp; You have a list of ideas to take to this new potential employer that you know will provide immense value. So, what&#39;s the next step?&amp;nbsp; All of that is placed onto a very professionally-looking resume and submitted.&amp;nbsp; The only problem is that everybody else has done that same thing.&amp;nbsp; You are not known as &quot;Bob, who will add huge value to the business intelligence team,&quot; you are known as applicant 27...just another resume in the stack.&lt;br /&gt;
&lt;br /&gt;
Perhaps you are on the other end of the spectrum.&amp;nbsp; You are a novice looking for your first data warehousing position with no prior experience outside of class.&amp;nbsp; You need a way to actually show that&amp;nbsp;despite your lack of work experience you can do this...and do it well.&lt;br /&gt;
&lt;br /&gt;
Do you need a fresh approach to marketing your skillset in hopes of standing out in the crowd?&amp;nbsp; It is interesting that those in the event industry are expected to provide samples of their work for potential clients.&amp;nbsp; Cake decorators, wedding photographers, and other similar vendors would probably be passed over if they only provided a resume that explained what they had done before or what their education claims that they are capable of doing.&lt;br /&gt;
&lt;br /&gt;
What if you placed a sample of your data warehousing skillset onto the web specifically for a potential employer to browse?&amp;nbsp; In other words, you would have a resume to provide the details of your experience and education and a portfolio to provide an example of what you can actually do.&amp;nbsp; &lt;em&gt;The Data Warehouse Portfolio&lt;/em&gt; is a book that suggests a way to accomplish this.&amp;nbsp; More information is available at &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;www.brianciampa.com&lt;/a&gt;.&amp;nbsp; You may also want to revisit &lt;a href=&quot;http://valuabledata.blogspot.com/2012/06/display-your-value.html&quot; target=&quot;_blank&quot;&gt;this prior blog post&lt;/a&gt; for a bit more information as well.&lt;br /&gt;
&lt;br /&gt;
Your job is to turn data into valuable data.&amp;nbsp; However, showing the value in yourself is the first step in getting that job.</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/2493839984549680378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/08/the-data-warehouse-portfolio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2493839984549680378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/2493839984549680378'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/08/the-data-warehouse-portfolio.html' title='The Data Warehouse Portfolio'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSYKEdC4KsB3Ojb3ZCBBV3CThiFq5Jru93eKvX2vjoteSWwkzong8iMzurEbTG-qiMmeF-O-nq4TO0CijHi9RQNkJnH5ja7nxsl7-in3jnn2rtQC8tCJiaMDwToOXU56Q5mTaxacz9qc/s72-c/DWH+Portfolio+Cover.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-4310825098240196672</id><published>2012-08-10T04:29:00.001-07:00</published><updated>2012-09-20T16:01:31.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Hands-on Practice"/><title type='text'>ETL - Practice Loading a Dimension - Solution</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUR7QShe6Kr3CEOaa_rF6Z1K6nu8F9G0vdDC3Vugb1I2VXN2XwmP6Ej3ZzQuYEvKJn3bjtUQO87J6qMOgM-jQLc3qLj5CIi7gvcqU9vur2VVU7yai2g4nRzWRk_sHw09RjOwN3l1joryA/s1600/Sculptor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;219&quot; kda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUR7QShe6Kr3CEOaa_rF6Z1K6nu8F9G0vdDC3Vugb1I2VXN2XwmP6Ej3ZzQuYEvKJn3bjtUQO87J6qMOgM-jQLc3qLj5CIi7gvcqU9vur2VVU7yai2g4nRzWRk_sHw09RjOwN3l1joryA/s320/Sculptor.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt; we looked at the process used to write a basic ETL job to populate a dimension table.&amp;nbsp; As discussed previously, while no two developers will write one exactly the same way, an ETL job that populates a dimension table will need to accomplish the following...&lt;br /&gt;
&lt;br /&gt;
1.) Extract all of the dimension attributes from the source.&lt;br /&gt;
2.) Transform the data according to the requirements (i.e., concatenate first name and last name to create a full name column, etc.)&lt;br /&gt;
3.) Identify those records that are new to the table as opposed to those records that already exist in the table and may need to be updated due to updates in the source system&lt;br /&gt;
4.) Generate new surrogate key values and add them to the new records&lt;br /&gt;
5.) Load the records into the dimension table&lt;br /&gt;
&lt;br /&gt;
Consider &lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/load_dim_product%20procedure.sql?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;this example&lt;/a&gt; of an Oracle PL/SQL procedure that will populate the&amp;nbsp;DIM_PRODUCT table.&amp;nbsp; Before running the procedure keep these things in mind...&lt;br /&gt;
&lt;br /&gt;
1.) I made an error in the SQL file from the previous post, so you may want to re-download that and run it again.&amp;nbsp; The DIM_PRODUCT.PRODUCT_EFFECTIVE_FLAG should be named DIM_PRODUCT.PRODUCT_ACTIVE_FLAG.&amp;nbsp; &lt;br /&gt;
2.) This job depends on an Oracle sequence to create the surrogate keys.&amp;nbsp; Before running the job, run this statement in your Oracle environment...&lt;br /&gt;
&lt;br /&gt;
CREATE SEQUENCE&lt;br /&gt;
SEQ_DIM_PRODUCT&amp;nbsp; &lt;br /&gt;
MINVALUE 0 &lt;br /&gt;
INCREMENT BY 1 &lt;br /&gt;
START WITH 1;&lt;br /&gt;
&lt;br /&gt;
3.) I&#39;ll encourage you not to get too lost in the Oracle syntax.&amp;nbsp; The point is to examine the logical flow of an ETL job.&amp;nbsp; If you have a better way of structuring the Oracle code (or want to use something other than Oracle), then by all means do that.&lt;br /&gt;
&lt;br /&gt;
Run the procedure (after you have created the sample data provided in the &lt;a href=&quot;http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt;, of course) to populate the&amp;nbsp;DIM_PRODUCT dimension.&amp;nbsp; Notice what is happening...&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1.)&lt;/strong&gt; &lt;strong&gt;Extract all of the dimension attributes from the source -&lt;/strong&gt; Everything is pulled from the source system and placed into the STAGE_PRODUCT_EXTRACT table.&lt;br /&gt;
&lt;strong&gt;2.)&lt;/strong&gt; &lt;strong&gt;Transform the data according to the requirements (i.e., concatenate first name and last name to create a full name column, etc.) -&lt;/strong&gt; The PRODUCT_ACTIVE_FLAG is derived and that data is placed into the STAGE_PRODUCT_TRANSFORM table.&lt;br /&gt;
&lt;strong&gt;3.)&lt;/strong&gt; &lt;strong&gt;Identify those records that are new to the table as opposed to those records that already exist in the table and may need to be updated due to updates in the source system -&lt;/strong&gt; New records are identified (via an outer join) and placed into the STAGE_PRODUCT_LOAD table.&amp;nbsp; &lt;br /&gt;
&lt;strong&gt;4.)&lt;/strong&gt; &lt;strong&gt;Generate new surrogate key values and add them to the new records -&lt;/strong&gt; Surrogate keys are created in the STAGE_PRODUCT_LOAD table using the Oracle sequence mentioned earlier.&lt;br /&gt;
&lt;strong&gt;5.)&lt;/strong&gt; &lt;strong&gt;Load the records into the dimension table -&lt;/strong&gt; Existing records are updated in the DIM_PRODUCT table and the new records from the STAGE_PRODUCT_LOAD table are loaded.&lt;br /&gt;
&lt;br /&gt;
This job is designed to be run as many times as necessary.&amp;nbsp; Running one time or multiple times should still result in 25 records being placed into the DIM_PRODUCT table.&amp;nbsp; This is a simple example for a few reasons, one of which is that we are working with a very small amount of data.&amp;nbsp; A more complex ETL job may examine the source system&#39;s data and somehow determine which records are new and/or have been updated before pulling them into the staging area.&lt;br /&gt;
&lt;br /&gt;
Also, more complex ETL jobs may not have five simple steps, as this one does,&amp;nbsp;to accomplish the five things listed above.&amp;nbsp; It may take several steps to accomplish those five things due to the complexity of the data.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
If you wish, change some of the source data to see the updates occur or tweak the ETL job to your liking.&amp;nbsp; By running this ETL job, you have just turned ordinary data into something that is truly valuable.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image: FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/4310825098240196672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4310825098240196672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/4310825098240196672'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension-solution.html' title='ETL - Practice Loading a Dimension - Solution'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUR7QShe6Kr3CEOaa_rF6Z1K6nu8F9G0vdDC3Vugb1I2VXN2XwmP6Ej3ZzQuYEvKJn3bjtUQO87J6qMOgM-jQLc3qLj5CIi7gvcqU9vur2VVU7yai2g4nRzWRk_sHw09RjOwN3l1joryA/s72-c/Sculptor.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-1192977104118964849</id><published>2012-08-03T10:46:00.001-07:00</published><updated>2012-09-20T16:03:50.431-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Hands-on Practice"/><title type='text'>ETL - Practice Loading a Dimension</title><content type='html'>We&#39;ve been &lt;a href=&quot;http://valuabledata.blogspot.com/2012/07/etl.html&quot; target=&quot;_blank&quot;&gt;looking recently&lt;/a&gt; at the concept of extract, transform, and load (ETL) jobs.&amp;nbsp; This post will begin to examine some of the mechanics.&amp;nbsp; When loading a dimension table the ETL job should accomplish the following things...&lt;br /&gt;
&lt;br /&gt;
1.) Extract all of the dimension attributes from the source.&lt;br /&gt;
2.) Transform the data according to the requirements (i.e., concatenate first name and last name to create a full name column, etc.)&lt;br /&gt;
3.) Identify those records that are new to the table as opposed to those records that already exist in the table and may need to be updated due to updates in the source system&lt;br /&gt;
4.) Generate new surrogate key values and add them to the new records&lt;br /&gt;
5.) Load the records into the dimension table&lt;br /&gt;
&lt;br /&gt;
Each ETL job that populates a dimension table will need to accomplish these five things, although no two developers will develop a job exactly the same way.&amp;nbsp; To get a feel for this type of job, consider this very simple example.&amp;nbsp; A source system contains these two tables among others (click the picture to enlarge)...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_iRyRvVotFjqJQuJPeUhjXrnizlgeaJ6E-AF3GElH_TZhKu5AlkDaSTNBN_xfYtJ5Trnf5tnwM4EgHAx3vWCcu25RNzPUlP-L4zjp3sYUagRuWYC3wx0wnz88HGyv58VSXRAx24S2rNA/s1600/PRODUCT+and+PRODUCT_GROUP+ERD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; eda=&quot;true&quot; height=&quot;103&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_iRyRvVotFjqJQuJPeUhjXrnizlgeaJ6E-AF3GElH_TZhKu5AlkDaSTNBN_xfYtJ5Trnf5tnwM4EgHAx3vWCcu25RNzPUlP-L4zjp3sYUagRuWYC3wx0wnz88HGyv58VSXRAx24S2rNA/s320/PRODUCT+and+PRODUCT_GROUP+ERD.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
...and this dimension needs to be populated...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBi7eT3UXFcK58IA9ZIAbZiw77kD32et2RUl8nu2ndhAhENksEV4pmmz_cx0kQIS_UfdTO7KaWBqvkonSAacS4RC3ZxvhU-vMQ9-nc4IFR4ArlRpN5dPrtjNEvgYqapWerYWjhGzBdSlY/s1600/DIM_PRODUCT+Table.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; eda=&quot;true&quot; height=&quot;135&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBi7eT3UXFcK58IA9ZIAbZiw77kD32et2RUl8nu2ndhAhENksEV4pmmz_cx0kQIS_UfdTO7KaWBqvkonSAacS4RC3ZxvhU-vMQ9-nc4IFR4ArlRpN5dPrtjNEvgYqapWerYWjhGzBdSlY/s200/DIM_PRODUCT+Table.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If you have an Oracle environment available to you, run &lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/Product_ETL_Data.sql?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;this sql file&lt;/a&gt; to create the two source system tables, populate them with data, and create the DIM_PRODUCT table.&amp;nbsp; Each product, as you can see, is grouped under a single product group.&amp;nbsp; The PRODUCT_EFFECTIVE_FLAG indicates whether or not a product is currently effective (current at the time of the ETL job).&amp;nbsp; If you wish, try to write an ETL job that will populate the DIM_PRODUCT table in PL/SQL or another language of your choosing.&amp;nbsp; We will examine a possible solution in a future post.</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/1192977104118964849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1192977104118964849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/1192977104118964849'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/08/etl-practice-loading-dimension.html' title='ETL - Practice Loading a Dimension'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_iRyRvVotFjqJQuJPeUhjXrnizlgeaJ6E-AF3GElH_TZhKu5AlkDaSTNBN_xfYtJ5Trnf5tnwM4EgHAx3vWCcu25RNzPUlP-L4zjp3sYUagRuWYC3wx0wnz88HGyv58VSXRAx24S2rNA/s72-c/PRODUCT+and+PRODUCT_GROUP+ERD.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-8997943539320932972</id><published>2012-07-21T12:31:00.001-07:00</published><updated>2012-09-20T16:04:39.490-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Videos"/><title type='text'>Extract, Transform, and Load Video</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;http://www.youtube.com/embed/zn0e5bMm8d8?fs=1&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
As a continuation of our&amp;nbsp;discussion of ETL, consider this YouTube video, which is also available at &lt;a href=&quot;http://www.youtube.com/brianciampa&quot;&gt;http://www.youtube.com/brianciampa&lt;/a&gt;.&amp;nbsp; Designing the star or snowflake schema is a great start.&amp;nbsp; However,&amp;nbsp; the ETL populates that star, thus transforming your data into something that is truly valuable.&amp;nbsp; In a future post we will look at an example of a basic ETL job in Oracle.</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/8997943539320932972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/07/extract-transform-and-load-video.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8997943539320932972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8997943539320932972'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/07/extract-transform-and-load-video.html' title='Extract, Transform, and Load Video'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/zn0e5bMm8d8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-5755983934313583034</id><published>2012-07-13T04:01:00.000-07:00</published><updated>2012-09-20T16:04:59.597-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><title type='text'>Extract, Transform, and Load (ETL)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY98XFEmI9SBvPmVaG7Y4sJdgVdG9XxXQYbwfu7wwt_HUe2Upv-pdKg_RaALu3vywTqyrkZqzpDcTNRShdIUyVqhHFd-Zcn5ZydRfPPU1bsGZMNkuEvC9B4AApJurAxUlGSVcLFL9ozQg/s1600/ETL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; ca=&quot;true&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY98XFEmI9SBvPmVaG7Y4sJdgVdG9XxXQYbwfu7wwt_HUe2Upv-pdKg_RaALu3vywTqyrkZqzpDcTNRShdIUyVqhHFd-Zcn5ZydRfPPU1bsGZMNkuEvC9B4AApJurAxUlGSVcLFL9ozQg/s320/ETL.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;In prior posts, we’ve looked a bit at the basic structure of a star schema but we have not looked at populating a star schema.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Populating a data warehouse is accomplished using an extract, transform, and load (ETL) job.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;This is a job that pulls data from the source system, transforms it into a structure appropriate for the data warehouse, and then loads that data into the data warehouse.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;The concept of ETL is not unlike any other craft or trade.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Consider the following…&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1.)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;A math student reads and understands the math problem from the textbook (extract), uses a piece of scrap paper, if calculators are not allowed, to find the solution (transform), and places the answer onto the final answer sheet (load).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2.)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;A carpenter purchases wood from a supplier (extract), uses his workshop to design, measure, sand, cut, etc. (transform), and then delivers the final product to the customer (load).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Usually, the transformation piece is accomplished inside of a separate schema in the database, called a staging area.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;The data from the source system is placed into this area and then restructured so that it is appropriate for the star schema, much like the math student uses the scrap paper and the carpenter uses the workshop.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;It is generally accepted that this area is for the ETL developer’s eyes only.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;End users do not have access to data in the staging area, much like a customer is not involved in the carpenter’s workshop and the math student does not place his chicken scratch on the sheet with the final answer.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Once that data has been transformed, it is placed into the star schema and is ready for analysis.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;It may be worth noting that some variations of ETL, such as ELT (extract, load, and transform), ETLT (extract, transform, load, and transform), and others, are used to describe methods by which jobs will populate a data warehouse using a different order than the standard extract then transform then load order.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;In order to encompass all of these terms,&lt;/span&gt;&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;_GoBack&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; the term data integration (or something similar) is often used to describe data warehouse population in a general sense.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;For more information on data warehousing concepts, remember to visit &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;http://www.brianciampa.com/&lt;/a&gt;.&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/5755983934313583034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/07/etl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/5755983934313583034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/5755983934313583034'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/07/etl.html' title='Extract, Transform, and Load (ETL)'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY98XFEmI9SBvPmVaG7Y4sJdgVdG9XxXQYbwfu7wwt_HUe2Upv-pdKg_RaALu3vywTqyrkZqzpDcTNRShdIUyVqhHFd-Zcn5ZydRfPPU1bsGZMNkuEvC9B4AApJurAxUlGSVcLFL9ozQg/s72-c/ETL.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-998956703565630775</id><published>2012-06-29T04:14:00.001-07:00</published><updated>2012-09-20T16:05:23.434-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Big Data"/><title type='text'>Big Data Defined</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYNZzfhnofPfhkLij6DejMfTg_n80BcBdPbQYXNtNGpO8bZ58koKii-I4BtuNTvwbSj8nyDwUAIDuinD3rM44Ez3qSKLwv9INt23sHMHd60Mte6dw4_CNGZXVXlN2otTvko-06Ng9gddA/s1600/Big+Data+Defined+Picture.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYNZzfhnofPfhkLij6DejMfTg_n80BcBdPbQYXNtNGpO8bZ58koKii-I4BtuNTvwbSj8nyDwUAIDuinD3rM44Ez3qSKLwv9INt23sHMHd60Mte6dw4_CNGZXVXlN2otTvko-06Ng9gddA/s320/Big+Data+Defined+Picture.jpg&quot; vca=&quot;true&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A typical question asked of business intelligence professionals is - what is big data?&amp;nbsp; In a &lt;a href=&quot;http://valuabledata.blogspot.com/2012/04/big-data.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt; I provided some explanation of the big data challenge.&amp;nbsp; As I&#39;ve learned more about this very interesting piece of business intelligence, I believe that a more complete explanation is available.&amp;nbsp; Consider this...&lt;br /&gt;
&lt;br /&gt;
Suppose you own a day care, meaning that you are in the business of caring for children each day.&amp;nbsp; You have determined that in order for you to have a truly challenging day, three things have to occur.&amp;nbsp; First, you must have a large number of kids to care for on that given day.&amp;nbsp; How large is large?&amp;nbsp; There are no hard and fast rules...large enough that your current resources are strained at best and inadequate at worst.&amp;nbsp; Second,&amp;nbsp;let&#39;s assume that&amp;nbsp;you have no help, meaning that you need to know what each child is doing right now.&amp;nbsp; Not knowing what one of them was doing for an hour and then finding out later that he was painting the refrigerator is not acceptable.&amp;nbsp; Third, you have a very diverse group of kids.&amp;nbsp; This does not refer to diversity with regards to race or ethnicity but diversity with regards to personality.&amp;nbsp; Some of the kids love to play outside&amp;nbsp;and some&amp;nbsp;inside.&amp;nbsp; Some are into puzzles and&amp;nbsp;others are into riding bicycles.&amp;nbsp; As a result, keeping the kids engaged in activities&amp;nbsp;that they enjoy and&amp;nbsp;in which they are gifted&amp;nbsp;can be&amp;nbsp;challenging.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
If&amp;nbsp;two of the three challenges exist, the day is still challenging but not to the same extent.&amp;nbsp; You can&amp;nbsp;know what&amp;nbsp;each child is&amp;nbsp;doing in a&amp;nbsp;diverse group if you have a small number of them.&amp;nbsp; You can deal with a large number of kids if they are ALL sitting in the same room, doing the same thing.&amp;nbsp; It&#39;s the combination of the three problems that presents a challenge.&amp;nbsp; Now, consider this in terms of big data.&amp;nbsp; Big data is characterized as having three V&#39;s.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
1.) Volume - In order to data to be considered big data it must be large.&amp;nbsp; How large is large?&amp;nbsp; I&#39;m not so sure that there is a hard and fast boundary between &quot;normal&quot; data and big data in terms of size.&amp;nbsp; However, I would assume that if managing the data for the purposes of business intelligence presents problems because of its size, then this V applies.&lt;br /&gt;
&lt;br /&gt;
2.) Velocity - Part of the big data problem involves dealing with the speed at which the data comes in.&amp;nbsp; Decision makers want to know what is happening in their business and in the marketplace now, as opposed to experiencing a lag.&amp;nbsp; For example, if an announcement was just made with regards to a new line of business, what are people saying about that on Twitter now?&amp;nbsp; If there is a&amp;nbsp;need to stream data in some way&amp;nbsp;so that it can be analyzed in real time, then this V applies.&lt;br /&gt;
&lt;br /&gt;
3.) Variety - Part of the big data problem involves dealing with various types of data.&amp;nbsp; Relational databases are good at storing structured data.&amp;nbsp; Structured data is data in which each element is placed into a fixed area (such as columns and&amp;nbsp;rows in a database or an XML schema) that was created for that specific element&#39;s characteristics.&amp;nbsp; Dates belong here, integers belong there, etc.&amp;nbsp; Unstructured data, such as a tweet or the body of an email message, are more free form.&amp;nbsp; In other words, there is nothing governing the type of data that is stored in those environments.&amp;nbsp; If decision makers want to analyze various types of data (such as both&amp;nbsp;structured and unstructured data) then this V applies.&lt;br /&gt;
&lt;br /&gt;
While challenges may exist when experiencing only one or two of the above mentioned V&#39;s, the industry generally agrees that if&amp;nbsp;all three characteristics apply to your data, then you have big data.&lt;br /&gt;
&lt;br /&gt;
Also, remember to visit &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;http://www.brianciampa.com/&lt;/a&gt; for more information on data warehousing and business intelligience.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Image: FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/998956703565630775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/06/big-data-defined.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/998956703565630775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/998956703565630775'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/06/big-data-defined.html' title='Big Data Defined'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYNZzfhnofPfhkLij6DejMfTg_n80BcBdPbQYXNtNGpO8bZ58koKii-I4BtuNTvwbSj8nyDwUAIDuinD3rM44Ez3qSKLwv9INt23sHMHd60Mte6dw4_CNGZXVXlN2otTvko-06Ng9gddA/s72-c/Big+Data+Defined+Picture.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2337378998924534323.post-8094681649305949145</id><published>2012-06-22T07:06:00.001-07:00</published><updated>2014-02-28T09:32:20.566-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimension Tables"/><category scheme="http://www.blogger.com/atom/ns#" term="Snowflake Schema"/><title type='text'>Snowflake Schema</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEa5nsi7_u3EF6bKvozSQveMyL2sn13_iA6ZXMVxh1vm9_YCmU95nI-1UN1BhOpeujqEnEWSS32pzA8IxzKjXTCH31n7rDfGjAtCMsMTl0JhaWy2eOFRWtwQYy3UlfNCl_goM8EeyDGAo/s1600/Snowflake_Picture.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEa5nsi7_u3EF6bKvozSQveMyL2sn13_iA6ZXMVxh1vm9_YCmU95nI-1UN1BhOpeujqEnEWSS32pzA8IxzKjXTCH31n7rDfGjAtCMsMTl0JhaWy2eOFRWtwQYy3UlfNCl_goM8EeyDGAo/s200/Snowflake_Picture.jpg&quot; height=&quot;165&quot; rca=&quot;true&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Going back to the piggy bank example from &lt;a href=&quot;http://valuabledata.blogspot.com/2012/01/valuable-data.html&quot; target=&quot;_blank&quot;&gt;this blog&#39;s first post&lt;/a&gt;, we know that the value of a data warehouse lies with allowing a user to analyze data easily.&amp;nbsp; This is mainly achieved through denormalization.&amp;nbsp; This often differs from the value of a source system which lies with getting data into the system quickly.&amp;nbsp; This is mainly achieved through normalization.&lt;br /&gt;
&lt;br /&gt;
So, if we were to run a select statement against a source system that is designed to return (among other things) an employee name as well as his department, those two things may be stored in two tables.&amp;nbsp; The employee table may simply store a foreign key to the department table, which stores the names of the departments.&amp;nbsp; The query may find &#39;John Smith&#39; in the employee table and then the number 6 in the department field.&amp;nbsp; The database will have to go to the department table, look up the row with the number 6 to see that the value is &#39;Human Resources&#39; and then return those two values, along with any other values that were specified in the select statement, in the query results.&amp;nbsp; Doing this for several rows and for several different kinds of values will take some time.&lt;br /&gt;
&lt;br /&gt;
In a typical data warehouse design, however, all of these values may exist in the same table and be repeated.&amp;nbsp; This way, the query can go to one table and find &#39;John Smith&#39; and &#39;Human Resources&#39; without having to translate a foreign key.&amp;nbsp; This keeps things quick.&lt;br /&gt;
&lt;br /&gt;
However, there are some instances in which some normalization is appropriate in a star schema.&amp;nbsp; This normalization is not to the extent that it exists in the source system, which is often third normal form, but it is normalization none the less.&amp;nbsp; Consider the ERD below (click on it to expand)...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLuQ9NegbWou1BcL6tF1OfhiaHGzTzojSzZSbomUUTZDEExKlcSoj9qWpHMZ9f5GGrFkt3QgXGtSd0hBvajBOrJXEgX9UEPc2M46e0lRtMy-pGfiCTApxRjuZM7hJGdfRj1GnyrBmSDQ/s1600/Snowflake+ERD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLuQ9NegbWou1BcL6tF1OfhiaHGzTzojSzZSbomUUTZDEExKlcSoj9qWpHMZ9f5GGrFkt3QgXGtSd0hBvajBOrJXEgX9UEPc2M46e0lRtMy-pGfiCTApxRjuZM7hJGdfRj1GnyrBmSDQ/s320/Snowflake+ERD.png&quot; height=&quot;123&quot; rca=&quot;true&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This is yet another addition to the star schema that we have been using for the past several weeks.&amp;nbsp; Notice the DIM_EXECUTIVE table at the bottom.&amp;nbsp; It is a dimension table that is joined directly to the DIM_EMPLOYEE dimension table.&amp;nbsp; It is not joined to the fact table.&amp;nbsp; Why would we not add the four non-key values directly to the DIM_EMPLOYEE table?&amp;nbsp; We could and that would not be incorrect, but what if there is not much executive information compared to the number of employees?&lt;br /&gt;
&lt;br /&gt;
So, if the DIM_EXECUTIVE table contains 10 rows and the DIM_EMPLOYEE table contains 4,000,000 rows, then placing this executive information into the DIM_EMPLOYEE table will result in 3,000,990 rows of empty space.&amp;nbsp; In this case, it might make sense.&lt;br /&gt;
&lt;br /&gt;
When a dimension table joins to another dimension table the star schema is now referred to as a snowflake schema.&amp;nbsp; The &quot;second layer&quot; of dimension tables causes the tables, when they are depicted in an ERD, to resemble a snowflake. &lt;br /&gt;
&lt;br /&gt;
I will add that when in doubt, it is probably best not to snowflake.&amp;nbsp; Snowflaking causes some additional complexity on the part of the reporting tools when it comes to interpreting the data.&lt;br /&gt;
&lt;br /&gt;
To experiment with analyzing this kind of data, you can run the script &lt;a href=&quot;https://sites.google.com/site/datawarehouseworkshop/Transaction_Star_Expanded.sql?attredirects=0&amp;amp;d=1&quot; target=&quot;_blank&quot;&gt;found here&lt;/a&gt; in an Oracle environment.&amp;nbsp; Rather than continue adding to the script little by little, this script will create ALL of the tables and data&amp;nbsp;depicted in the ERD.&amp;nbsp; As with &lt;a href=&quot;http://valuabledata.blogspot.com/2012/06/junk-dimensions.html&quot; target=&quot;_blank&quot;&gt;last week&#39;s post on junk dimensions&lt;/a&gt;, you have some options with regards to snowflaking or not.&amp;nbsp; Remember that your number one goal is to turn your organization&#39;s data into something that is truly valuable, thus enabling your leaders to make excellent decisions.&amp;nbsp; Make your decision with that in mind.&lt;br /&gt;
&lt;br /&gt;
More on snowflaking can be found in the books listed in the additional reading section to the right as well as by visiting &lt;a href=&quot;http://www.brianciampa.com/&quot;&gt;http://www.brianciampa.com/&lt;/a&gt; and, under the Concepts menu, clicking Terms or Advanced.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Update:&lt;/b&gt; The &lt;a href=&quot;http://valuabledata.blogspot.com/2012/10/kimball-conference-lessons-learned.html&quot; target=&quot;_blank&quot;&gt;Kimball training&lt;/a&gt; that I received taught me that I was incorrect in classifying this type of design as a snowflake schema. &amp;nbsp;A snowflake schema contains a completely normalized version of the dimension tables. &amp;nbsp;This post describes an outrigger table. &amp;nbsp;The example above should still be considered a star schema. &amp;nbsp;Sorry for my mistake.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Image(s): &lt;/span&gt;&lt;a href=&quot;http://www.freedigitalphotos.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;FreeDigitalPhotos.net&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://valuabledata.blogspot.com/feeds/8094681649305949145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://valuabledata.blogspot.com/2012/06/snowflake-schema.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8094681649305949145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2337378998924534323/posts/default/8094681649305949145'/><link rel='alternate' type='text/html' href='http://valuabledata.blogspot.com/2012/06/snowflake-schema.html' title='Snowflake Schema'/><author><name>Brian Ciampa</name><uri>http://www.blogger.com/profile/01045328612029017219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3W1eYMcHXac-tg-om-Gkyh0sD6f9KAByG_vUvTafplHdjEx6P2NEdfJ9DSliKsf9snz4kWtHA-3T4bb6RsUq4TZnBrNN11T6PadDWkoEfIR6l8qXk3XL2e-hig3jAGU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEa5nsi7_u3EF6bKvozSQveMyL2sn13_iA6ZXMVxh1vm9_YCmU95nI-1UN1BhOpeujqEnEWSS32pzA8IxzKjXTCH31n7rDfGjAtCMsMTl0JhaWy2eOFRWtwQYy3UlfNCl_goM8EeyDGAo/s72-c/Snowflake_Picture.jpg" height="72" width="72"/><thr:total>5</thr:total></entry></feed>