Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Exam Professional Data Engineer Topic 3 Question 91 Discussion

Actual exam question for Google's Professional Data Engineer exam
Question #: 91
Topic #: 3
[All Professional Data Engineer Questions]

Your company's customer_order table in BigOuery stores the order history for 10 million customers, with a table size of 10 PB. You need to create a dashboard for the support team to view the order history. The dashboard has two filters, countryname and username. Both are string data types in the BigQuery table. When a filter is applied, the dashboard fetches the order history from the table and displays the query results. However, the dashboard is slow to show the results when applying the filters to the following query:

How should you redesign the BigQuery table to support faster access?

Show Suggested Answer Hide Answer
Suggested Answer: C

To improve the performance of querying a large BigQuery table with filters on countryname and username, clustering the table by these fields is the most effective approach. Here's why option C is the best choice:

Clustering in BigQuery:

Clustering organizes data based on the values in specified columns. This can significantly improve query performance by reducing the amount of data scanned during query execution.

Clustering by countryname and username means that data is physically sorted and stored together based on these fields, allowing BigQuery to quickly locate and read only the relevant data for queries using these filters.

Filter Efficiency:

With the table clustered by countryname and username, queries that filter on these columns can benefit from efficient data retrieval, reducing the amount of data processed and speeding up query execution.

This directly addresses the performance issue of the dashboard queries that apply filters on these fields.

Steps to Implement:

Redesign the Table:

Create a new table with clustering on countryname and username:

CREATE TABLE project.dataset.new_table

CLUSTER BY countryname, username AS

SELECT * FROM project.dataset.customer_order;

Migrate Data:

Transfer the existing data from the original table to the new clustered table.

Update Queries:

Modify the dashboard queries to reference the new clustered table.


BigQuery Clustering Documentation

Optimizing Query Performance

Contribute your Thoughts:

Major
3 months ago
Partitioning by country and username is the obvious choice here. Anything else would just be a waste of time. 'Obvious' as a feather on a fish, am I right?
upvoted 0 times
Edelmira
2 months ago
C) Cluster the table by country and username fields
upvoted 0 times
...
Goldie
2 months ago
Partitioning by country and username is the best approach for faster access.
upvoted 0 times
...
Tuyet
2 months ago
A) Cluster the table by country field, and partition by username field.
upvoted 0 times
...
...
Johnna
3 months ago
I think partitioning by _PARTITIONTIME would also be a good option to consider for faster access.
upvoted 0 times
...
Beckie
3 months ago
But clustering by country field would reduce the data scanned when filtering by country, making it faster.
upvoted 0 times
...
Kaitlyn
3 months ago
I disagree, I believe partitioning the table by country and username fields would be more efficient.
upvoted 0 times
...
Beckie
3 months ago
I think we should cluster the table by country field and partition by username field.
upvoted 0 times
...
Alex
3 months ago
Clustering the table by country and username sounds like a good idea, but partitioning is probably more efficient. I'd go with option B.
upvoted 0 times
Camellia
3 months ago
Yeah, that way the dashboard can fetch the data faster when applying the filters.
upvoted 0 times
...
Simona
3 months ago
I agree, partitioning the table by country and username fields seems like the best option.
upvoted 0 times
...
...
Ernestine
3 months ago
Partitioning by _PARTITIONTIME might work, but it doesn't address the specific filters we need. Gotta go with option B.
upvoted 0 times
...
Ashanti
4 months ago
Hmm, I think partitioning by both country and username fields is the way to go. That should give us faster lookups on those filters.
upvoted 0 times
Berry
2 months ago
Hmm, I think partitioning by both country and username fields is the way to go. That should give us faster lookups on those filters.
upvoted 0 times
...
Nichelle
3 months ago
B) Partition the table by country and username fields.
upvoted 0 times
...
Christiane
3 months ago
A) Cluster the table by country field, and partition by username field.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77