July 2018
Intermediate to advanced
506 pages
16h 2m
English
An important difference between Cloud Spanner and Cloud SQL is that Spanner does not currently support data manipulation through standard SQL queries. Instead, insertions and modifications must be performed via API calls. Whereas we previously used a simple data import command in Cloud SQL, we'll populate our Spanner library database by executing a Python script, chapter_09/example_02/seed-spanner-data.py. Execute this command from an authenticated Terminal, such as the Google Cloud Shell:
# install the needed dependenciespip install -r requirements.txt# execute the script to seed example datapython seed_spanner_data.py
For performing bulk uploads, there are a number of ad hoc methods, but Cloud Spanner does ...