---
title: Write data back to Databricks from Google Sheets
description: Write data from Google Sheets back to a Unity Catalog table with the Databricks Connector for Google Sheets. Create a new table or overwrite an existing one.
canonical_url: https://docs.databricks.com/gcp/en/integrations/google-sheets/write-back
---

# 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](https://docs.databricks.com/gcp/en/integrations/google-sheets/connect.md) is set up and connected to your workspace.
* You have **Workspace access**. See [Manage entitlements](https://docs.databricks.com/gcp/en/security/auth/entitlements.md).
* You have access to a running [SQL warehouse](https://docs.databricks.com/gcp/en/compute/sql-warehouse/index.md).
* Your workspace admin has enabled **Allow spreadsheet writeback**. To access this setting, click your username in the upper-right corner, select **Settings**, then click **Security** in the sidebar.
* 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](https://docs.databricks.com/gcp/en/data-governance/unity-catalog/access-control/privileges-reference.md).

## 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.

## <a id="write-back" />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

* [Databricks Connector for Google Sheets](https://docs.databricks.com/gcp/en/integrations/google-sheets/index.md)
* [Set up the Databricks Connector for Google Sheets](https://docs.databricks.com/gcp/en/integrations/google-sheets/connect.md)
* [Query Databricks data in Google Sheets](https://docs.databricks.com/gcp/en/integrations/google-sheets/query-data.md)
