Use Data Boost in your applications

This page lists the Spanner APIs that support Spanner Data Boost and explains how to view sample code that uses Data Boost. With Data Boost, you can run large analytic queries with near-zero impact to existing workloads on the provisioned Spanner instance.

Before you begin

Ensure that the principal (for example, the service account) that runs the application has the spanner.databases.useDataBoost Identity and Access Management (IAM) permission. For more information, see Access control with IAM.


For partitioned reads with Data Boost, the following Spanner APIs have an option to enable Data Boost:

We recommend that you use ExecuteStreamingSql and streamingRead in your applications, because ExecuteSql and read are limited to 10 MB of data in their responses.

Sample code

For examples of using Data Boost in your application code, see Read data in parallel.

Apache Spark SQL Connect for Google Cloud Spanner

The Apache Spark SQL Connector for Google Cloud Spanner supports reading Google Cloud Spanner tables into Spark's DataFrames using the Spanner Java library. For more information about the Apacha Spark SQL Connector, see Apache Spark SQL connector for Google Cloud Spanner.

What's next