Connect to Google Cloud Spanner

Connect Data Studio to Cloud Spanner databases.

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

The Cloud Spanner connector allows you to access data from Cloud Spanner within Data Studio.

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

To connect

  1. Sign in to Data Studio.
  2. In the top left, click , then select Data Source.
  3. Select the Cloud Spanner connector.
  4. Configure access to your database (see below).
  5. Type your SQL query.
  6. In the upper right, click CONNECT.
    1. The data source fields panel appears.
    2. The data source is now connected to your data set.

You can now access all of the fields in the SQL query as fields in your reports.

Connection options

Connecting to Cloud Spanner requires the following connection information:

  • Project ID
  • Instance ID
  • Database ID

List instance configurations

The gcloud command-line tool enables you to interact with Cloud Spanner. You use the gcloud spanner command to interact with Cloud Spanner.

To see the set of instance configurations that are available for your project:

gcloud spanner instance-configs list

You should see a list of regional and multi-region configurations.

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

Special data types

Data Studio maps your table's column data types to a unified set of Data Studio types. Some database types are currently not supported in Data Studio. When Data Studio encounters a column of a non-supported 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.

Was this helpful?
How can we improve it?