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
- In the console, open Connectors, choose Add connector, then Google Cloud Spanner.
- Enter Project ID, Instance ID and Database.
- Paste the whole key file into Service Account JSON.
- 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.
| Field | Type | Required |
|---|---|---|
| Project ID Google Cloud project ID my-gcp-project | Text | Yes |
| Instance ID Spanner instance identifier my-spanner-instance | Text | Yes |
| Database Spanner database name my_database | Text | Yes |
| Service Account JSON Paste the full service account JSON credentials {"type": "service_account", "project_id": "...", ...} | Text | Yes |
Updated