Exam4Training

What are two methods that can be used to denormalize tables in BigQuery?

What are two methods that can be used to denormalize tables in BigQuery?
A . 1) Split table into multiple tables; 2) Use a partitioned table
B . 1) Join tables into one table; 2) Use nested repeated fields
C . 1) Use a partitioned table; 2) Join tables into one table
D . 1) Use nested repeated fields; 2) Use a partitioned table

Answer: B

Explanation:

The conventional method of denormalizing data involves simply writing a fact, along with all its dimensions, into a flat table structure. For example, if you are dealing with sales transactions, you would write each individual fact to a record, along with the accompanying dimensions such as order and customer information. The other method for denormalizing data takes advantage of BigQuery’s native support for nested and repeated structures in JSON or Avro input data. Expressing records using nested and repeated structures can provide a more natural representation of the underlying data. In the case of the sales order, the outer part of a JSON structure would contain the order and customer information, and the inner part of the structure would contain the individual line items of the order, which would be represented as nested, repeated elements.

Reference: https://cloud.google.com/solutions/bigquery-data-warehouse#denormalizing_data

Exit mobile version