Manage your data using Bigtable Studio

This page explains how to explore and manage your Bigtable data using Bigtable Studio in the Google Cloud console.

Bigtable Studio includes an Explorer pane that integrates with the following:

  • Query builder, an interactive form that lets you build and run a query without writing code
  • Query editor, where you can create and execute SQL commands
  • SQL query results table

If you're new to Bigtable, learn how to create an instance and write data with the cbt CLI .

Required roles

To get the permissions that you need to query a table, ask your administrator to grant you the following IAM roles on the instance that contains the table:

For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Explore your data

You can use the explorer to perform the following actions on your Bigtable resources:

Bigtable resource Explorer actions
Table
  • Create a new table
  • Create a backup
  • Prevent deletion
  • Edit
  • Delete
  • View a sample query
  • View backups
  • Monitor
  • Export to Cloud Storage
Column families
  • Add a column family to a table
Specific column family
  • Edit a garbage collection policy
Authorized view
  • Open in the query builder
  • Grant access
  • Delete
View
  • View definition in the query editor
Materialized view
  • View definition in the query editor
  • Enable or disable deletion protection

To access the Explorer, follow these steps:

  1. In the Google Cloud console, open the Bigtable instances page.

    Go to instances list

  2. Select an instance from the list.

  3. In the navigation menu, click Bigtable Studio. The Explorer pane displays a list of tables and authorized views in the instance.

Query your data in the query builder

The query builder is an interactive form that lets you send read requests to the Bigtable Data API from the Google Cloud console without needing to write code or SQL statements. For more information, see Build queries in the console.

Query your data with SQL in the query editor

Using the query editor, you can run any combination of SQL SELECT statements. Statements must be separated by a semicolon.

Statements are executed based on the order in which you enter them in the query editor.

To query your data, follow these steps:

  1. In the Google Cloud console, open the Bigtable instances page.

    Go to instances list

  2. Select an instance from the list.

  3. In the navigation menu, click Bigtable Studio.

  4. Compose a query:

    1. Open a new tab by clicking and then choosing Editor.
    2. When the query editor appears, write your query. If the query is valid SQL, a Valid message is displayed.
    3. Optional: To return all cells in the queried columns instead of only the most recent cell, append the table ID with (with_history => TRUE).
  5. Optional: To format your statement in SQL style, click Format.

  6. Click Run. The results of your query appear in the Results table.

  7. To view a formatted display of a row's data, click the row in the results table. The Row details pane opens. Each column qualifier and its value are displayed on a new line. If you run the query using (with_history => TRUE), each cell in a column is presented as a struct that includes the value and timestamp for the cell.

  8. Optional: To run only a selected portion of the text in the editor, highlight it, and then click Run selected. The results of the highlighted query appear in the Results table.

To remove all text from the query editor, click Clear.

For more information, including examples, about crafting SQL statements to query your Bigtable data, see the GoogleSQL for Bigtable overview.

Create logical views

Bigtable Studio lets you create and save logical views of your Bigtable tables. Logical view operations require permissions beyond those granted in roles/bigtable.reader. For details, see the documentation for each view type.

Authorized views

You can use the query builder to create and save authorized views, which are table subsets that you grant access to separately from access to the table. You can also grant access and delete authorized views in Bigtable Studio, using the Action menu in the explorer.

For more information, see Create and manage authorized views.

Materialized views

You can use the query editor to create a materialized view, a precomputed result of a continuously running SQL query that synchronizes with its source table with incremental updates. Materialized views often contain aggregated data based on values in their source tables.

For more information, see the following documentation:

Logical views

You can also use the query editor to create a logical view, a saved query that can be queried like a table. For more information, see Create and manage views.

What's next