With Sheetgo, you can connect your Databricks workspace directly to Google Sheets to automatically import query results, table data, or workspace analytics. This integration helps data teams, analysts, and business users build live dashboards and reports without manually exporting data from Databricks. By automating Databricks data retrieval, you ensure that your Google Sheets reflect up-to-date insights from your Lakehouse environment.
Prerequisites
- A Databricks account with API access enabled.
- Your Databricks Workspace URL, Personal Access Token (PAT), and HTTP Path (for SQL endpoints).
- Access to the official Databricks REST API documentation: https://docs.databricks.com/api/workspace/introduction.html.
- A Sheetgo account connected to your Google Workspace.
Step 1: Identify the Required API Endpoint
Visit the Databricks REST API documentation linked above and locate the endpoint that retrieves your required dataset. For example, to run a SQL query from a Databricks SQL Warehouse, use: https://
/api/2.0/sql/statements. Replace
with your actual workspace domain (e.g., adb-1234567890123456.17.azuredatabricks.net).
Step 2: Generate API Credentials
In Databricks, click your profile icon → User Settings → Developer and select Access Tokens. Click Generate New Token, add a name and expiration period, then click Generate. Copy your Personal Access Token (PAT) and store it securely. This token will authenticate your connection in Sheetgo.
Step 3: Open the Sheetgo API Connector
Log in to Sheetgo and open an existing workflow or create a new one. Click on Connect and choose API Request under Data Source. Then select HTTP Request as the method type. You’ll be prompted to enter the API URL and configure authentication and headers.
Step 4: Configure the API Request in Sheetgo
Open Sheetgo, create a new workflow, and select HTTP Request as your data source. Use the suitable SQL query endpoint to run your query. Then, paste the following JSON configuration into the Headers field:
{
"Authorization": "Bearer YOUR_DATABRICKS_PAT",
"Content-Type": "application/json",
"@pagination": {
"type": "cursor",
"cursor_param": "next_page_token",
"next_cursor_key": "next_page_token"
}
}If you are retrieving paginated query results, Databricks provides next_page_token for pagination, which this configuration supports automatically.
Step 5: Choose the Destination Spreadsheet
Select or create a Google Sheet where the Databricks data will be imported. You can configure columns to match your query output fields (e.g., column headers like user_id, total_sales, or region). Decide whether to overwrite existing data or append new records each time Sheetgo runs the workflow.
Step 6: Execute the Sheetgo Connection
Click Run to execute your workflow. Sheetgo will send a GET request to Databricks, execute the SQL statement, and import the resulting data into your chosen spreadsheet. Once the data loads successfully, you can set up automatic refreshes (e.g., hourly or daily) to ensure your Google Sheet remains synced with your Databricks datasets for continuous real-time analytics.
