# Data Enrichment

### Enrich a set of buffers using Quadbin indexes&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to generate buffers around a specific set of points; convert those buffers to a regular grid and then enrich the grid with socio-demographic data from CARTO Spatial Features.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/buffer_enrich_quadbin.sql)

<figure><img src="/files/ZK4Ej3hgm3o4FbHPUOT6" alt=""><figcaption></figcaption></figure>

### Enrich trade areas using H3 indexes

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to generate trade areas around certain points of interest and enrich them with socio-demographic data using an H3 grid and the [CARTO Spatial Features](https://app.carto.com/catalog/dataset/cdb_spatial_fea_94e6b1f) dataset.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/enrich_trade_areas_h3.sql)

<div align="left"><figure><img src="/files/GeV8JGUwDN3XoXZPFIQp" alt=""><figcaption></figcaption></figure></div>

### Enrich point data with a custom source

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to enrich a set of point targets with a custom data source.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/enrich_points.sql)

<div align="left"><figure><img src="/files/QJHM313D7YENAZrq3FQA" alt="" width="563"><figcaption></figcaption></figure></div>

### Enrich polygon data with a custom source&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to enrich a set of polygons targets with a custom data source.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/enrich_polygon.sql)

<div align="left"><figure><img src="/files/JEd5krLfJTiiuhmYHioQ" alt="" width="563"><figcaption></figcaption></figure></div>

### Enrich grid data with a custom source

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to enrich a spatial index grid with a custom data source.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/enrich_grid.sql)

<div align="left"><figure><img src="/files/4CFYMYkuYUUzOUAvvkjP" alt="" width="563"><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.carto.com/creating-workflows/workflow-templates/data-enrichment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
