Skip to Content
Google Cloud Platform for Developers
book

Google Cloud Platform for Developers

by Ted Hunter, Steven Porter
July 2018
Intermediate to advanced
506 pages
16h 2m
English
Packt Publishing
Content preview from Google Cloud Platform for Developers

Importing data into Cloud Spanner

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google Cloud Platform in Action

Google Cloud Platform in Action

John J. (JJ) Geewax
Google Cloud Platform for Architects

Google Cloud Platform for Architects

Vitthal Srinivasan, Loonycorn Ravi, Judy Raj

Publisher Resources

ISBN: 9781788837675Supplemental Content