Skip to main content

Write data back to Databricks from Google Sheets

The Databricks Connector for Google Sheets lets you write data from Google Sheets back to a Unity Catalog table. You can create a new table or overwrite an existing table in Databricks without leaving Google Sheets.

Prerequisites

Before you write data back to Databricks from Google Sheets:

  • The Databricks Connector for Google Sheets is set up and connected to your workspace.

  • You have Workspace access. See Manage entitlements.

  • You have access to a running SQL warehouse.

  • You have the necessary privileges on the target catalog and schema in Unity Catalog:

    • To create a new table, you must have the following privileges:
      • USE CATALOG on the catalog
      • USE SCHEMA on the schema
      • CREATE TABLE on the schema
    • To overwrite an existing table, you must have the following privileges:
      • USE CATALOG on the catalog
      • USE SCHEMA on the schema
      • SELECT on the table
      • MODIFY on the table

    For more information, see Unity Catalog privileges reference.

Select a SQL warehouse

Select which SQL warehouse to use:

  1. In Google Sheets, click Extensions > Databricks Connector > Launch sidebar to open the connector.
  2. In the upper-right corner of the connector sidebar, select the SQL warehouse you want to use.

Write data back to Databricks

You can write a range from Google Sheets back to Databricks in one of two ways:

  • Create new table: Create a new Unity Catalog table from the selected range.
  • Overwrite existing table: Replace the contents of an existing Unity Catalog table with the selected range.

To create a new Unity Catalog table or overwrite an existing Unity Catalog table from Google Sheets:

  1. In the Databricks Connector sidebar, select the Write back tab.
  2. Select Create new table or Overwrite existing table.
  3. Search for and select the destination Catalog and Schema.
  4. Specify the target table:
    • To create a new table, enter a name.
    • To overwrite an existing table, select the table you want to overwrite.
  5. Choose the range that contains the data you want to write. By default, the first row of the range is used as the column headers.
  6. Click Use selection to confirm the data to write back to Databricks.
  7. Click Create table or Overwrite table to write back data.

Limitations

  • Write-back supports table-level writes only. Row-level updates, appends, and merges are not supported.
  • Write-back does not support creating views or materialized views.
  • The Databricks Connector for Google Sheets only supports SQL warehouses. All-purpose compute is not supported.

Additional resources