Skip to content
TableR
FeaturesWorkflowAgentEnginesChangelogDocs
Download
/

Getting started

  • Introduction
  • Getting started

Guides

    • PostgreSQL
    • MySQL
    • MariaDB
    • CockroachDB
    • Greenplum
    • Amazon Redshift
    • SQL Server
    • Vertica
    • ClickHouse
    • Snowflake
    • BigQuery
    • SQLite
    • DuckDB
    • Cassandra
    • Redis
    • MongoDB
    • LibSQL
    • Cloudflare D1
    • Oracle (ORDS)
    • Amazon DynamoDB
    • Elasticsearch
    • OpenSearch
    • Google Spanner
    • Trino
    • SurrealDB
    • Weaviate
  • Plugins & drivers
  • SQL workspace
  • Exploring data
  • Visualize & diagrams
  • AI & Agent

Reference

  • Keyboard shortcuts
  • Architecture

Help

  • FAQ & support
Documentation/Google Spanner

Google Spanner

Connect TableR to Google Cloud Spanner over its REST API with an instance path, database name, and OAuth2 access token — via the spanner-driver plugin.

Spanner is reached over the Google Cloud REST API — the connection is provided by the spanner-driver plugin (install it from the plugins page). You identify the target by instance path and database name, and authenticate with an OAuth2 access token.

Overview

TableR calls the Spanner REST API (spanner.googleapis.com) — there is no host/port to run. The host field takes the instance path projects/<project>/instances/<instance>, the database field the database name, and the password field a Google OAuth2 access token. Set SPANNER_EMULATOR_HOST to point at a local emulator instead.

  • REST API — reached at spanner.googleapis.com over HTTPS; emulator via SPANNER_EMULATOR_HOST.
  • Instance path — the host field carries projects/<p>/instances/<i>, not a hostname.
  • OAuth2 token — the password field takes a Google access token; stored in the keyring.
  • Plugin-gated — the Spanner card appears once the spanner-driver plugin is installed.

Before you start

  • The spanner-driver plugin installed (Plugins → Google Spanner → Install).
  • The instance path projects/<project>/instances/<instance>.
  • The database name inside that instance.
  • A Google OAuth2 access token with Spanner read access.

Connection fields

These fields match TableR's Spanner connection form. The access token is stored in the operating system keyring, never in plain configuration files.

FieldRequiredDefaultNotes
HostYes—The instance path: projects/<project>/instances/<instance>.
DatabaseYes—The database name inside the instance.
PasswordYes—A Google OAuth2 access token; stored in the OS keyring.

Connect with the form

  1. 1
    Install the Spanner plugin

    Open Plugins, find Google Spanner, and install the spanner-driver plugin.

  2. 2
    Choose Google Spanner

    Open the launcher and pick the Google Spanner card.

  3. 3
    Enter the instance path

    Use projects/<project>/instances/<instance> in the host field.

  4. 4
    Enter the database name

    Name the database inside that instance.

  5. 5
    Add the access token

    Paste a Google OAuth2 access token in the password field; it is saved to the keyring.

  6. 6
    Save and connect

    Save the profile so it reappears in the launcher, then connect.

Verify the connection

Once connected, open a query tab and run GoogleSQL:

SELECT 1;
SELECT table_name FROM information_schema.tables;

If both statements return, the instance path, database, and token are all correct.

Troubleshooting

SymptomLikely causeFix
Spanner card missingThe spanner-driver plugin is not installed.Open Plugins and install the Google Spanner driver, then retry.
Spanner host must be the instance path projects/<p>/instances/<i>The host is a hostname instead of an instance path.Use the full projects/<project>/instances/<instance> form.
Spanner database name is requiredThe database field is empty.Enter the database name inside the instance.
401 / invalid authentication credentialsMissing or expired OAuth2 access token.Mint a fresh token (gcloud auth print-access-token) and update the saved password.
Instance not foundWrong project or instance name in the path.Re-check the projects/<p>/instances/<i> path in the host field.

Next steps

SQL workspace

Write and run queries, manage tabs, and read results.

Exploring data

Browse schemas, tables, and columns, and search across databases.

All engines

Back to the connections overview and the full engine list.

PreviousOpenSearchNextTrino
Was this page helpful?
Edit this page on GitHub
In this section
  • Overview
  • Before you start
  • Connection fields
  • Connect with the form
  • Verify the connection
  • Troubleshooting
  • Next steps