Google Professional Data Engineer Question 190
Single answerGoogle Cloud PlatformYou are designing a data pipeline for a retail company that collects sales transaction data from stores across multiple regions. The data will be used for real-time analytics to track hourly sales trends and for monthly reports to analyze long-term performance. What level of time granularity should you choose for storing the sales transaction data in the data warehouse to meet both requirements efficiently?
- A
Store data at the second level of granularity.
- B
Store data at the minute level of granularity.
- C
Store data at the hourly level of granularity.
- D
Store data at the daily level of granularity.
Show answer and explanation
Correct answer: C
Explanation
The appropriate time granularity depends on the requirements for data analysis. In this case, hourly granularity is sufficient to meet the needs for real-time hourly trend tracking and monthly performance reporting while avoiding unnecessary storage and processing overhead. Lower granularity (e.g., seconds or minutes) would add unneeded complexity, while higher granularity (e.g., daily) would lose critical detail required for hourly trend analysis.
- A. Incorrect.
Storing data at the second level of granularity is unnecessarily detailed for the use case. This would require excessive storage and processing without adding meaningful insights for hourly trends or monthly reports.
- B. Incorrect.
Storing data at the minute level of granularity is more suitable than seconds but still exceeds the requirements of the use case since hourly trends and monthly analysis don't need minute-level precision.
- C. Correct.
Storing data at the hourly level of granularity is the most appropriate choice since it aligns with the need for hourly sales trends and monthly reporting. It balances storage efficiency and the level of detail required.
- D. Incorrect.
Storing data at the daily level of granularity does not meet the requirement for real-time analytics to track hourly sales trends, as it aggregates data too broadly.