PhloemDocs
Markdown
Integration

Google Cloud Spanner

Globally distributed relational database

Category
Data warehouses
Runs in
The Phloem cloud — nothing to install

Lets you and Hamming query a Spanner database with SQL, with its tables listed in Trace.

What Phloem reads

  • Tables and views in the default schema — columns, types, interleaved parents and foreign keys — listed in Trace for Hamming and SQL autocomplete
  • Tables in named schemas are not listed, but you can still query them by name

What you need

  • The Google Cloud project ID, Spanner instance ID and database name
  • A service account JSON key that can read the database. If it cannot, the connection test names the role it needs: roles/spanner.databaseReader.

Connect

  1. In the console, open Connectors, choose Add connector, then Google Cloud Spanner.
  2. Enter Project ID, Instance ID and Database.
  3. Paste the whole key file into Service Account JSON.
  4. Choose Test Connection, then Create Connection.

What Hamming can do

  • Run SQL that you or Hamming write, as the service account

Notes

  • Phloem runs any statement, not only SELECT. Give the service account read-only access to keep the connector read-only.

#Connection fields

What the Add connector form asks for.

FieldTypeRequired
Project ID
Google Cloud project ID
my-gcp-project
TextYes
Instance ID
Spanner instance identifier
my-spanner-instance
TextYes
Database
Spanner database name
my_database
TextYes
Service Account JSON
Paste the full service account JSON credentials
{"type": "service_account", "project_id": "...", ...}
TextYes

Updated