> For the complete documentation index, see [llms.txt](https://documentation.bonsaidata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.bonsaidata.io/developer-docs/geo-api/schema.md).

# Schema

This documentation describes the standard tables in your Bonsai data warehouse, enabling reliable access to core marketing and business data with consistent naming, data types, and performance.

## Overview

These tables provide standardized geographic reference data used across the Bonsai platform. They map postal codes, regions, cities, and DMAs while supplying demographic indices to enable consistent geographic segmentation, modeling, and reporting.

***

### Geo Mapping

<details>

<summary><code>dma_table</code> schema<br><br><strong>Description:</strong> A reference table of DMA data for the Bonsai platform.</summary>

| field\_name | is\_nullable | data\_type | definition       |
| ----------- | ------------ | ---------- | ---------------- |
| dma\_id     | YES          | INT64      | Bonsai's DMA ID. |
| dma\_name   | YES          | STRING     | DMA name.        |

</details>

<details>

<summary><code>dma_demographics_indicies_data_table</code> schema<br><br><strong>Description:</strong> A reference table of DMA demographic and household indices for the Bonsai platform.</summary>

| field\_name         | is\_nullable | data\_type | definition                     |
| ------------------- | ------------ | ---------- | ------------------------------ |
| dma\_id             | YES          | INT64      | Bonsai's DMA ID.               |
| dma\_name           | YES          | STRING     | DMA name.                      |
| pop\_index          | YES          | FLOAT64    | US population index.           |
| tv\_index           | YES          | FLOAT64    | US TV household index.         |
| household\_index    | YES          | FLOAT64    | US household index.            |
| male\_index         | YES          | FLOAT64    | US male population index.      |
| female\_index       | YES          | FLOAT64    | US female population index.    |
| male\_1824\_index   | YES          | FLOAT64    | Male 18–24 population index.   |
| female\_1824\_index | YES          | FLOAT64    | Female 18–24 population index. |
| male\_2534\_index   | YES          | FLOAT64    | Male 25–34 population index.   |
| female\_2534\_index | YES          | FLOAT64    | Female 25–34 population index. |
| male\_3544\_index   | YES          | FLOAT64    | Male 35–44 population index.   |
| female\_3544\_index | YES          | FLOAT64    | Female 35–44 population index. |
| male\_4554\_index   | YES          | FLOAT64    | Male 45–54 population index.   |
| female\_4554\_index | YES          | FLOAT64    | Female 45–54 population index. |
| male\_5564\_index   | YES          | FLOAT64    | Male 55–64 population index.   |
| female\_5564\_index | YES          | FLOAT64    | Female 55–64 population index. |
| male\_65\_index     | YES          | FLOAT64    | Male 65+ population index.     |
| female\_65\_index   | YES          | FLOAT64    | Female 65+ population index.   |

</details>

<details>

<summary><code>zip_to_dma</code> schema<br><br><strong>Description:</strong> A reference table mapping US Postal Codes to Bonsai DMA IDs.</summary>

| field\_name | is\_nullable | data\_type | definition       |
| ----------- | ------------ | ---------- | ---------------- |
| zip\_code   | YES          | STRING     | US postal code.  |
| dma\_id     | YES          | INT64      | Bonsai's DMA ID. |

</details>

<details>

<summary><code>zip_to_region</code> schema<br><br><strong>Description:</strong> A reference table mapping US Postal Codes to US State/Region.</summary>

| field\_name  | is\_nullable | data\_type | definition                                                |
| ------------ | ------------ | ---------- | --------------------------------------------------------- |
| zip\_code    | YES          | STRING     | US postal code.                                           |
| region\_code | YES          | STRING     | Bonsai's region ID.                                       |
| region\_abbr | YES          | STRING     | Region abbreviation, typically the US state abbreviation. |
| region\_name | YES          | STRING     | Region name, typically referring to US state.             |

</details>

<details>

<summary><code>city</code> schema<br><br><strong>Description:</strong> A reference table of cities in the Bonsai platform.</summary>

| field\_name | is\_nullable | data\_type | definition        |
| ----------- | ------------ | ---------- | ----------------- |
| city\_id    | YES          | INT64      | Bonsai's city ID. |
| city\_name  | YES          | STRING     | City name.        |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.bonsaidata.io/developer-docs/geo-api/schema.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
