Understanding Cloud Spanner (UCS)


Course Overview

In this course, you learn about Cloud Spanner. You will get an introduction to Cloud Spanner and understand how it differs from other database products. You also learn when and how to use Cloud Spanner to solve your relational database needs at scale.

Who should attend

Database administrators, engineers/developers, and cloud architects who want to learn how to create, optimize, and manage Spanner databases and migrate existing databases into Spanner.


Some prior Google Cloud experience at the fundamental level and experience with relational databases, the SQL language, and some programming are assumed.

Course Objectives

  • Build scalable, managed, relational databases using Cloud Spanner
  • Create and manage Cloud Spanner databases using the CLI, Terraform, Python API, and the Cloud Console
  • Program and run queries and transactions using the Cloud Spanner API
  • Integrate Cloud Spanner with applications

Outline: Understanding Cloud Spanner (UCS)

Module 1 - The Need for Spanner


  • What is Spanner?
  • Spanner and the CAP Theorem
  • History of Spanner
  • Cloud Spanner Use Cases


  • Explain the core concepts and features of Cloud Spanner.
  • Understand how Cloud Spanner fits in the CAP theorem.
  • Describe the history of Cloud Spanner.
  • Explain Cloud Spanner use cases.

Module 2 - Getting Started with Spanner


  • Planning Spanner Instances
  • Automating Instance Creating
  • Creating Databases in Spanner


  • Architect Cloud Spanner instances based on location, capacity, availability, and cost.
  • Create Spanner instances by using the Google Cloud console, Google Cloud CLI, and Terraform.
  • Create Spanner databases by using SQL


  • Lab: Creating Spanner Instances and Databases (Console)
  • Lab: Creating Spanner Instances and Databases (CLI and Terraform)

Module 3 - Optimizing Spanner Schemas


  • Spanner Architecture
  • Choosing Primary Keys
  • Defining Database Schemas in Spanner
  • Understanding Interleaving and Foreign Keys
  • Understanding Secondary Indexes


  • Optimize schemas for Spanner architecture.
  • Choose appropriate primary keys.
  • Manage relationships with primary and foreign keys and with interleaved tables


  • Lab: Choosing Primary Keys
  • Lab: Managing relationships with Foreign Keys and Interleaved Tables

Module 4 - Programming Spanner Applications, Queries, and Transactions


  • Authentication and Authorization
  • Using the Spanner Client Libraries
  • Running Queries
  • Managing Transactions


  • Authenticate users and applications that access Spanner databases using Identity Access Management.
  • Program Spanner applications using Google Cloud client libraries and Python.
  • Optimize queries using strong reads, stale reads, and indexes.
  • Manage transactions in Spanner.


  • Lab: Programming Spanner Applications with Python
  • Lab: Running Queries and Transactions

Module 5 - Deploying Spanner Applications


  • Using Spanner from Applications
  • Building Data Pipelines into and out of Spanner


  • Deploy Spanner applications to Google Cloud serverless runtimes.
  • Migrate data to and from Cloud Spanner by using Dataflow jobs and Apache Beam.


  • Lab: Deploying Spanner Applications with Cloud Functions and Cloud Run
  • Lab: Migrating Data to and from Spanner with Dataflow

Module 6 - Spanner Administration


  • Managing your Data in Spanner
  • Managing Change Operations


  • Administer Cloud Spanner instances.
  • Backup, restore, import, and export data.
  • Modify database schemas with no downtime.
  • Monitor your Cloud Spanner databases and applications


  • Lab: Reconciling Account Data with Cloud Spanner Change Streams
  • Lab: Leverage the Autoscaler Tool for Cloud Spanner to Achieve Workload Elasticity

Module 7 - Spanner Best Practices


  • Spanner Best Practices
  • Challenge Lab


  • Review best practices for using Cloud Spanner


  • Challenge Lab: Administering a Spanner Database

Prices & Delivery methods

Online Training

3 days

  • US$ 1,995
Classroom Training

3 days

  • United States: US$ 1,995

Click on town name or "Online Training" to book Schedule

Instructor-led Online Training:   This is an Instructor-Led Online (ILO) course. These sessions are conducted via WebEx in a VoIP environment and require an Internet Connection and headset with microphone connected to your computer or laptop.


Online Training Time zone: America/Buenos_Aires Enroll


Online Training Time zone: America/Sao_Paulo Enroll


Online Training Time zone: America/Santiago Enroll


Online Training Time zone: America/Bogota Enroll

Costa Rica

Online Training Time zone: America/Costa_Rica Enroll


Online Training Time zone: America/Mexico_City Enroll


Online Training Time zone: America/Panama Enroll


Online Training Time zone: America/Lima Enroll