Connect to Google Cloud Spanner

Connect Data Studio to Cloud Spanner databases.

The Cloud Spanner connector allows you to access data from Google Cloud Spanner within Data Studio. Cloud Spanner is an enterprise-grade, globally-distributed, and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with non-relational horizontal scale.

Cloud Spanner is a paid service. Learn more about pricing.

In this article:

How to connect to Google Cloud Spanner

A Data Studio data source can connect to Cloud Spanner databases using Google Standard SQL query syntax.

To connect

  1. Sign in to Data Studio.
  2. In the top left, click Create then select Data Source.
  3. Select the Cloud Spanner connector.
  4. If asked, authorize Data Studio to access your data.
  5. On the left, set up the connection to your database. You'll need to provide:
    1. Project ID
    2. Instance ID (see the Notes below to find out how to list your instance configurations).
    3. Database ID
  6. In the text box, enter your SQL query.
  7. In the upper right, click CONNECT.

In a moment, the data source fields list page appears. In the upper right, click CREATE REPORT or EXPLORE to start visualizing your data.


List instance configurations

The Cloud SDK command-line tool enables you to interact with Cloud Spanner. For example, the following command lists the regional and multi-region instance configurations that are available for your project:

gcloud spanner instance-configs list

Regional configurations distribute data in a single region, while multi-region configurations distribute data geographically across multiple regions. Learn more about Instances.

Data types

Data Studio maps your database's native data types to a unified set of data types. If Data Studio encounters a column in your table or query of an unsupported type, it will not create a field for that column.

Limits of the Cloud Spanner connector

  • The response size from Cloud Spanner is limited to 10 MB. See the Cloud Spanner Limits article for other limits.
  • Column headers (field names) must use ASCII characters only. Non-ASCII characters aren't supported.
Was this helpful?
How can we improve it?
Clear search
Close search
Google apps
Main menu
Search Help Center