0
0
GCPcloud~20 mins

BigQuery for analytics in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
BigQuery Analytics Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding BigQuery Query Pricing

You run a query in BigQuery that scans 10 GB of data. Your project has a flat-rate pricing plan of 200 slots. What will be the cost behavior for this query?

AThe query cost is fixed because of the flat-rate plan, so no additional cost for scanning 10 GB.
BThe query cost depends on the amount of data scanned, so it will be charged for 10 GB scanned.
CThe query cost depends on the number of slots used, so it will be charged per slot regardless of data scanned.
DThe query cost is free for queries under 10 GB scanned per month.
Attempts:
2 left
💡 Hint

Think about how flat-rate pricing works compared to on-demand pricing in BigQuery.

Architecture
intermediate
2:00remaining
Choosing Partitioning Strategy for BigQuery Tables

You have a large dataset with sales data including a sale_date column. You want to optimize query performance and cost for queries filtering by date ranges. Which partitioning strategy should you choose?

ADo not partition the table; use clustering on <code>sale_date</code> instead.
BPartition the table by <code>sale_date</code> using ingestion time partitioning.
CPartition the table by <code>customer_id</code> using integer range partitioning.
DPartition the table by <code>sale_date</code> using column-based partitioning.
Attempts:
2 left
💡 Hint

Consider which partitioning method allows filtering by an existing date column efficiently.

security
advanced
2:00remaining
BigQuery Data Access Control

You want to restrict access so that a user can only query a specific dataset but cannot see other datasets in the project. Which IAM role and permission setup achieves this?

AGrant the user the <code>roles/bigquery.admin</code> role on the project.
BGrant the user the <code>roles/bigquery.user</code> role at the project level.
CGrant the user the <code>roles/bigquery.dataViewer</code> role on the specific dataset only.
DGrant the user the <code>roles/viewer</code> role on the project.
Attempts:
2 left
💡 Hint

Think about least privilege and dataset-level permissions.

Best Practice
advanced
2:00remaining
Optimizing BigQuery Table Design for Frequent Small Queries

Your application runs many small queries filtering on user ID and timestamp. Which table design improves query speed and reduces cost?

APartition the table by timestamp and cluster by user ID.
BPartition the table by user ID and cluster by timestamp.
CDo not partition; cluster by user ID and timestamp.
DPartition the table by ingestion time and cluster by user ID and timestamp.
Attempts:
2 left
💡 Hint

Consider which column is best for partitioning to reduce scanned data for time-based filters.

🧠 Conceptual
expert
2:00remaining
BigQuery Slot Allocation Behavior

You have a BigQuery reservation with 100 slots shared by multiple projects. If one project runs a large query using 80 slots and another project runs a small query, how does BigQuery allocate slots to the small query?

AThe small query waits until slots free up because the large query uses most slots.
BThe small query gets a minimum guaranteed number of slots reserved for it.
CThe small query can use any free slots immediately, even if the large query is running.
DThe small query is canceled automatically if slots are not available.
Attempts:
2 left
💡 Hint

Think about slot reservations and guarantees in BigQuery.