The Cloud Spanner connector lets you access data from Google Cloud Spanner within Looker 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.
How to connect to Google Cloud Spanner
A Looker Studio data source can connect to Cloud Spanner databases using Google Standard SQL query syntax.
To connect
- Sign in to Looker Studio.
- On the Looker Studio home page, in the top left, click Create, and then select Data Source.
- Select the Cloud Spanner connector.
- If asked, authorize Looker 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 section to find out how to list your instance configurations).
- Database ID
- In the text field, enter your SQL query.
- In the upper right, click CONNECT.
In a moment, the data source fields list page appears. Click CREATE REPORT to start visualizing your data.
Notes
List instance configurations
The Cloud SDK command-line tool lets you 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
Looker Studio maps your database's built-in data types to a unified set of data types. If Looker Studio encounters a column in your table or query of an unsupported type, it won't create a field for that column.
Limits of the Spanner connector
- The response size from Spanner is limited to 10 MB. See the Spanner Limits article for other limits.
- Column headers (field names) must use ASCII characters only. Non-ASCII characters aren't supported.
Troubleshooting
See the Looker Studio troubleshooting guide for a list of common error messages and steps to resolve them.