Introduction to SQL

In addition to its Admin and Data APIs, Bigtable supports SQL queries.You can use SQL to query your Bigtable data in the followingways:

  • For low-latency application development, GoogleSQL forBigtable
  • For batch processing and ETL, Spark SQL
  • To analyze data from multiple sources, BigQuery

GoogleSQL for Bigtable

GoogleSQL is a query language used by multiple Google Cloudservices, including Spanner and BigQuery. You can createand run GoogleSQL queries inBigtableStudio in the Google Cloud console,or you can run them programmatically using one of the client libraries forBigtable that support SQL queries. For more information, seeUseSQL with a Bigtable clientlibrary.

GoogleSQL for Bigtable is similar to the Cassandraquery Language (CQL) in many ways, and it includes a map data type, designed toquery the Bigtable data stored in column families, columns, andcells.

To get started, see theGoogleSQL forBigtable overview.

Spark SQL

For data science use cases or other batch processing and ETL, theBigtable Spark connector lets you read and writeBigtable data using Spark SQL. For more information, seeUse the Bigtable Spark connector.

BigQuery

If you want to blend data from multiple sources, includingBigtable, and run batch, ad hoc analytics, you can createBigQuery external tables and run SQL queries fromBigQuery. For more information, seeQuery and analyze Bigtable data with BigQuery.

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-15 UTC.