Question

In: Computer Science

According to best practices, we would never use both the transactional grain pattern and the periodic...

According to best practices, we would never use both the transactional grain
pattern and the periodic snapshot grain pattern in the same DWE
(if we have a data mart with one of these patterns, we would never have a
different data mart for the same business process using the other pattern)?

Solutions

Expert Solution

Transactional grain:
In transactional grain Fact data tables holds the source record exactly without any modifications to actual data.
Exceptions to this rule are the standard business rules that are applied to enhance the data.
Good example for this scenario is sales table containing customer orders

  • Each event is stored in the fact table only once.
  • It has a date column indicating when the event occurred.
  • It has an identifier column which identifies each event.
  • The number of rows is the same as the source table.

Lets say on Monday we had 50 orders, Tuesday 60 orders, Wednesday 80, and like that.
So on Monday night we load the 50 rows for Monday into the data warehouse.
On Tuesday night we load the 60 rows for Tuesday, and on Wednesday night we load the 80 rows for Wednesday.

In addition to 60 new orders on Tuesday, we also have updates to some of the 50 Monday orders.
This is they key difference to the Periodic Snapshot fact table Transactional fact table updates existing rows, and therefore lost some history.


Observation:

  • In this Sales Fact Table, every order is stored only once.
  • The 60 orders on Tuesday are different to the 50 orders on Monday and are also different to the 80 Wednesday orders.
  • For this we use the order date column. In the above example the Monday, Tuesday and Wednesday are the order date. This order date column indicates when the event occurred, when the order happened.
  • In this sales table we also have a sales identifier, such as order number if it is a shop, or ticket number if it is a restaurant.
  • On Wednesday night, after the warehouse load finishes, we have 50+60+80 = 190 rows, the same as in the source system.

Periodic Snapshot grain:

  • A snapshot table has non-cumulative facts and hence the design includes a “Time” context, which is mandatory.
  • Inventory data and Financial General Ledger data are example for this type of fact.
  • The underlying data is calculated along the defined Time context and populated in fact table.
  • The summary in a bank account statement is that kind of periodic snapshot: starting balance, ending balance, interest.
  • Here in Periodic Snapshot grain
  • The whole source system is copied into the fact table regularly.
  • The same event is stored multiple times.
  • It has a snapshot date column indicating when a copy of the source table was created.

Lets consider bank account balance. so at the end of the day, the balances of every customer account in the bank is stored in this account balance table.
Say there were 10,000 customers on Monday; 11,000 customers on Tuesday and 12,000 customers on Wednesday.


Observation:

  • Daily we extract the whole content of the account balance table into the periodic snapshot fact table.
  • So on Monday night we stored 10,000 rows in the account balances periodic snapshot fact table, on Tuesday night 11,000 rows and on Wednesday night 12,000 rows. Here an account is copied each day to the fact table and each day with likely a different balance amount.
  • In the fact table we have a column called snapshot date. For all the rows created on Monday night, we set the snapshot date column to (for example) 22nd Mar 2020. The rows created on Tuesday night we set the snapshot date to 23rd Mar 2020 and for the Wednesday rows we set the snapshot date to 24th Mar 2020.
  • In the fact table, the Monday data set contains these accounts, but the Tuesday data set doesn’t contain these accounts, and neither does the Wednesday data set and there are accounts which were updated on Tuesday. These changes will be reflected on the Tuesday snapshot in the fact table, different to their Monday rows.

Hence we need understand that as a we should never have different datamart with different pattern, it is up to business which is sutiable for them if they are concern with the captures of the mesurement at the most atomic dimensional level at the pint in time of the transaction which wil provide robust dimensional grouping and rool-up and drill down reporting capabilities for the business users.

However if the business uses periodic snapshot grain it will capture the state of the metrics at a specified point time to quickly access the performance of the measures over specified time intervals (week, month, quater, year and so on.


Related Solutions

6. Which type of instrument would best be used to look at a grain of wheat...
6. Which type of instrument would best be used to look at a grain of wheat pollen. a) optical microscope b) radio telescope c) transmission electron microscope d) scanning electron microscope e) variable electron microscope 14) Rutherford’s alpha particle -scattering experiment showed that most alpha particles directed toward a thin metallic foil passed through with only slight deviations. From this evidence we can conclude that..... 18. Two stars star A and star B are the same size. The temperature of...
How does effective communication apply to best practices with instruction both with colleagues and with families?...
How does effective communication apply to best practices with instruction both with colleagues and with families? Should an educator collaborate with peers when developing lesson plans? Should they share weekly instruction with families?
system analysis According to the CHAOS Report (from the Standish Group), the most important best practices...
system analysis According to the CHAOS Report (from the Standish Group), the most important best practices for success are user involvement are user involvement and executive management support. What does this mean? What they are, how you would achieve them, and how their absence can cause negative consequences for the project. What does that mean? (33points)
65. Because carbon and silicon are both elements in group 14 on the periodic table, we...
65. Because carbon and silicon are both elements in group 14 on the periodic table, we expect them to react with other elements in similar ways. To some extent, then do, but in some cases, carbon and silicon compounds that seem to have analogous structures have very different chemical characteristics. For example, carbon tetrachloride, CCl4 is very stable in the presence of water, but silicon tetrachloride, CCl4, reacts quickly with water. The unbalanced equation for this reaction is                 SiCl4...
Consider a flute: would it be best modelled by a tube open at both ends or...
Consider a flute: would it be best modelled by a tube open at both ends or as a tube with one end open, and one end close? What is the condition for resonance as a function of the tube length in both cases? Sketch the displacement of molecules in a flute for the fundamental mode (1st harmonic) along with the 2nd and 3rd harmonics.
According to the videos in the module, which statistical test would best be used to see...
According to the videos in the module, which statistical test would best be used to see whether there is a relationship between a dragon's color (red or green) and a dragon's behavior (dangerous, moody, or friendly)? A: Chi square B: T-test C: ANOVA D Pearson's R (correlation) According to the videos in the module, what test would Helen use to see if there is a relationship between the number of packets of Choconutties she sells and the temperature? (Helen thinks...
Evaluate how implementing best practices would have reduced the chances for failure. Provide support for your...
Evaluate how implementing best practices would have reduced the chances for failure. Provide support for your rationale
present best practices from current literature (scholarly sources) for compliance and meeting regulations on both federal and state levels.
You work for a health care organization that frequently needs to share information with other providers. Your organization has a very important relationship with a diagnostics center in particular where you frequently need to share patient information such as lab results, X-rays, and other diagnostic information. You have been asked to review your company's protocols on sharing and receiving patient information for outside providers to ensure that your organization is in compliance with the latest standards and regulations. present best...
Amongst rank and file employees, how should we distribute compensation? What are some best practices? What...
Amongst rank and file employees, how should we distribute compensation? What are some best practices? What compensation systems do you think are best and why?
Explain when or why would you use the description pattern of essay development by providing an...
Explain when or why would you use the description pattern of essay development by providing an example.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT