# Google Sheets

Cloud spreadsheet application

- Category: Files & storage
- Runs in: the Phloem cloud

Lets you and Hamming query the tabs of your Google Sheets with SQL.

## What Phloem reads
- Every tab of the spreadsheets you pick. Each tab is one table, and its first row gives the column names.
- Each tab's columns, listed in Trace

## What you need
- A Google account that can open the spreadsheets
- Your consent to read-only access to Sheets and Drive

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Google Sheets**.
2. Choose **Sign in with Google**. Your browser goes through your Phloem account to Google, where you approve read-only access, then back to the console.
3. On **Select Spreadsheets**, pick the spreadsheets to connect.
4. On **Save Connection**, name the connection and save it.

## What Hamming can do
- Run SQL over the connected tabs: query, sample rows, count rows, list columns

Nothing it does changes your spreadsheets.

## Notes
- A table is named after its tab: lowercase, other characters turned into underscores (`Parts List` → `parts_list`). If two picked tabs share a name, each gets its spreadsheet's name in front (`bom__parts`).
- Repeated column names get `_1`, `_2`, … . An empty header becomes `column`.
- Tabs are read at query time, and fetched again only when the spreadsheet has changed.
- A run field can take its choices from a query over a connected sheet.
- A query on a deleted tab, or a spreadsheet no longer shared with the account, fails and says so. The connection stays healthy.
- If Phloem loses access, choose **Reconnect** on the connector's page and sign in again.
