> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Storage

> Query files in Google Cloud Storage with your Google Cloud credentials, or anonymously from public buckets.

Query data in Google Cloud Storage with the same table functions you use for local files. Chowder reads the source using credentials available to your application.

## URI form

```text theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
gs://<bucket>/<path>
```

## Query a public object

This example reads a CSV file from Google's public `cloud-samples-data` bucket:

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT
    name,
    post_abbr
FROM read_csv('gs://cloud-samples-data/bigquery/us-states/us-states.csv')
WHERE name LIKE 'New%';
```

No setup is needed. Without Google Cloud credentials, Chowder reads public buckets anonymously. See [Authentication](#authentication).

## Query an existing object

Replace the uppercase placeholders with a Parquet file you can read. The optional demo setup below creates a matching file.

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT
    title,
    content
FROM read_parquet('gs://YOUR_BUCKET/chowder-demo/amazon-reviews.parquet')
WHERE content ILIKE '%battery%'
LIMIT 5;
```

## Authentication

Chowder uses the process's Google Cloud credentials: Application Default Credentials from `gcloud auth application-default login`, a service account key in `GOOGLE_APPLICATION_CREDENTIALS`, or the metadata server on Google Cloud. Keep credentials outside SQL.

* **No credentials found:** Chowder reads the bucket anonymously. Public objects load. A private bucket fails with an error that says how to configure credentials.
* **Credentials added later:** when an anonymous read is denied, Chowder checks for credentials again, so you don't need to restart Python after `gcloud auth application-default login`.
* **A credential source fails:** for example, with expired Application Default Credentials, the query fails with that error instead of reading anonymously.
* **Forced anonymous access:** set `GOOGLE_SKIP_SIGNATURE=true` to read anonymously even when credentials exist.

Chowder reads only the byte ranges a reader needs, such as selected Parquet columns or matching MCAP chunks.

## Optional: reproduce the demo

To reproduce the query with the Chowder review fixture, download `demo/amazon-reviews.parquet` using [Local files](https://docs.chowder.ai/reference/sources/local-files.md). Replace every uppercase placeholder with your own storage name, then copy the fixture:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
gcloud storage cp demo/amazon-reviews.parquet gs://YOUR_BUCKET/chowder-demo/amazon-reviews.parquet
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.