GCP - Cloud Firestore and BigtableWhy might this Firestore document update fail? docRef.update({"location.city": "Boston"})ABecause dot notation cannot be used to update nested fieldsBBecause Firestore only supports flat documentsCBecause the update method requires an arrayDBecause the document does not existCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand dot notation in updatesFirestore supports dot notation to update nested fields like "location.city".Step 2: Identify common failure causeIf the document does not exist, update will fail because it cannot modify a non-existent document.Final Answer:Because the document does not exist -> Option DQuick Check:Update fails if document missing, dot notation allowed [OK]Quick Trick: Ensure document exists before updating nested fields [OK]Common Mistakes:Thinking dot notation is invalidAssuming update needs arraysBelieving Firestore disallows nested fields
Master "Cloud Firestore and Bigtable" in GCP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More GCP Quizzes Cloud Firestore and Bigtable - Firestore queries and indexes - Quiz 5medium Cloud Firestore and Bigtable - Real-time updates with listeners - Quiz 9hard Cloud Functions - Function runtime environments - Quiz 3easy Cloud IAM Advanced - Access Context Manager - Quiz 11easy Cloud IAM Advanced - Custom roles creation - Quiz 14medium Cloud Load Balancing - Load balancer types comparison - Quiz 7medium Cloud Monitoring and Logging - Log-based metrics - Quiz 9hard Cloud Monitoring and Logging - Log-based metrics - Quiz 2easy Cloud Monitoring and Logging - Error Reporting - Quiz 14medium Cloud SQL and Databases - Cloud Spanner for global distribution - Quiz 10hard