Connect to Google Cloud Spanner
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.
- Sign in to Data Studio. After signing in, you'll see the Home page, with the REPORTS tool selected.
- On the left, navigate to the DATA SOURCES Home page.
- In the bottom right, click .
- Select the Cloud Spanner connector.
- Configure access to your database (see below).
- Type your SQL query.
- In the upper right, click CONNECT.
- The data source fields panel appears.
- 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.
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.