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.
- Sign in to Data Studio.
- In the top left, click then select Data Source.
- Select the Cloud Spanner connector.
- If asked, authorize Data Studio to access your data.
- On the left, set up the connection to your database. You'll need to provide:
- Project ID
- Instance ID (see the Notes below to find out how to list your instance configurations).
- Database ID
- In the text box, enter your SQL query.
- 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 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.