0
0
GCPcloud~10 mins

Bigtable schema design in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a column family named 'stats' in a Bigtable schema.

GCP
column_families = { '[1]': {} }
Drag options to blanks, or click blank then click option'
Astats
Bdata
Cinfo
Dmetrics
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column qualifier instead of a column family name.
Using an invalid or empty string as the column family.
2fill in blank
medium

Complete the code to set the row key prefix for efficient Bigtable reads.

GCP
row_key = '[1]#user123#2024-06-01'
Drag options to blanks, or click blank then click option'
Auser
Bregion
Ctimestamp
Ddevice
Attempts:
3 left
💡 Hint
Common Mistakes
Using a timestamp prefix that causes hotspotting.
Using a device prefix that is not consistent.
3fill in blank
hard

Fix the error in the Bigtable schema definition by completing the blank.

GCP
column_families = { 'stats': { 'gc_rule': [1] } }
Drag options to blanks, or click blank then click option'
AMaxAgeGCRule('7d')
BMaxVersionsGCRule(3)
CMaxVersionsGCRule('3')
DMaxAgeGCRule(7)
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a string instead of an integer to MaxVersionsGCRule.
Using MaxAgeGCRule with incorrect argument types.
4fill in blank
hard

Fill both blanks to create a Bigtable row key with reversed timestamp and user ID.

GCP
row_key = '[1]#[2]'
Drag options to blanks, or click blank then click option'
Auser123
B20240601
Creverse_timestamp
Duser_id
Attempts:
3 left
💡 Hint
Common Mistakes
Placing user ID before the reversed timestamp causing hotspotting.
Not reversing the timestamp leading to uneven data distribution.
5fill in blank
hard

Fill all three blanks to define a Bigtable schema with a column family, GC rule, and row key prefix.

GCP
schema = {
  'column_families': {
    '[1]': {
      'gc_rule': [2]
    }
  },
  'row_key_prefix': '[3]'
}
Drag options to blanks, or click blank then click option'
Ametrics
BMaxVersionsGCRule(5)
Cuser#
Dstats
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect GC rule type or argument.
Choosing a row key prefix that causes hotspots.
Mixing column family names and prefixes.