Use Data Boost in your applications

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

Before you begin

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

APIs

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

We recommend that you useExecuteStreamingSql andstreamingRead in yourapplications, becauseExecuteSql andread are limited to 10 MB ofdata in their responses.

Sample code

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

Apache Spark SQL Connect for Google Cloud Spanner

The Apache Spark SQL Connector for Google Cloud Spanner supportsreading Google Cloud Spanner tables into Spark's DataFrames usingthe Spanner Java library. For more information about the ApachaSpark SQL Connector, seeApache Spark SQL connector for Google Cloud Spanner.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.