# Integration Specifications

### Integration Overview

H-E-B Circana provides retailer-specific market data for H-E-B stores using Circana as the data source. The integration delivers weekly and aggregated sales data, promotional metrics, distribution information, and product attributes at the market level.

This document provides context on what kind of data is being gathered through this extractor, which data sources that data is coming from, and how the extracted tables relate to each other.

### Integration Availability

This integration is available for:

* Enterprise

### Data Source

The Daasity H-E-B Circana extractor is built based on file-based data delivery (CSV files via S3 upload or manual upload). The following data sources are used by Daasity to replicate data from H-E-B Circana:

* CSV file upload (`heb_circana_data*.csv`)
* CSV file upload (`heb_circana_products*.csv`)

**Data provider:** Circana (retailer-specific implementation for H-E-B)

### H-E-B Circana Schema

The Daasity H-E-B Circana extractor creates these tables using the data sources and replication methods listed. The data is mapped from source CSV file columns to the table based on the mapping logic outlined in each table.

The H-E-B Circana integration consists of two separate integrations, each creating one raw data table:

* [HEB Circana Data](#heb-circana-data)
* [HEB Circana Products](#heb-circana-products)

{% hint style="info" %}
**Note:** The raw data from both tables is combined during transformation to create the final URMS sales report for reporting and analysis in Looker and other reporting tools.
{% endhint %}

{% hint style="warning" %}
**Important:** Both integrations (HEB Circana Data and HEB Circana Products) must have files uploaded and tables created. The transformation pipeline will fail if both tables (`retail.heb_circana_data` and `retail.heb_circana_products`) do not exist.
{% endhint %}

### HEB Circana Data

**Source:** CSV file upload (`heb_circana_data*.csv`)

**Update Method:** UPSERT

**Table Name:** `retail.heb_circana_data`

**Contains:** Sales/fact data including revenue, units sold, promotional metrics, and distribution data

| CSV Column                                  | Database Column                                   |
| ------------------------------------------- | ------------------------------------------------- |
| Geography                                   | geography                                         |
| Time                                        | time                                              |
| Product                                     | product                                           |
| Dollar Sales                                | dollar\_sales                                     |
| Dollar Sales Year Ago                       | dollar\_sales\_year\_ago                          |
| Dollar Sales Any Merch                      | dollar\_sales\_any\_merch                         |
| Dollar Sales Any Merch Year Ago             | dollar\_sales\_any\_merch\_year\_ago              |
| Dollar Sales Price Reductions Only          | dollar\_sales\_price\_reductions\_only            |
| Dollar Sales Price Reductions Only Year Ago | dollar\_sales\_price\_reductions\_only\_year\_ago |
| Dollar Sales Feature Only                   | dollar\_sales\_feature\_only                      |
| Dollar Sales Feature Only Year Ago          | dollar\_sales\_feature\_only\_year\_ago           |
| Dollar Sales Display Only                   | dollar\_sales\_display\_only                      |
| Dollar Sales Display Only Year Ago          | dollar\_sales\_display\_only\_year\_ago           |
| Dollar Sales Feature and Display            | dollar\_sales\_feature\_and\_display              |
| Dollar Sales Feature and Display Year Ago   | dollar\_sales\_feature\_and\_display\_year\_ago   |
| Unit Sales                                  | unit\_sales                                       |
| Unit Sales Year Ago                         | unit\_sales\_year\_ago                            |
| Unit Sales Any Merch                        | unit\_sales\_any\_merch                           |
| Unit Sales Any Merch Year Ago               | unit\_sales\_any\_merch\_year\_ago                |
| ACV Weighted Distribution                   | acv\_weighted\_distribution                       |
| ACV Weighted Distribution Year Ago          | acv\_weighted\_distribution\_year\_ago            |
| Base Dollar Sales                           | base\_dollar\_sales                               |
| Base Dollar Sales Year Ago                  | base\_dollar\_sales\_year\_ago                    |
| Base Unit Sales                             | base\_unit\_sales                                 |
| Base Unit Sales Year Ago                    | base\_unit\_sales\_year\_ago                      |
| Total Points of Distribution                | total\_points\_of\_distribution                   |
| Total Points of Distribution Year Ago       | total\_points\_of\_distribution\_year\_ago        |
| Base Unit Sales Any Merch                   | base\_unit\_sales\_any\_merch                     |
| Base Unit Sales Any Merch Year Ago          | base\_unit\_sales\_any\_merch\_year\_ago          |
| Base Dollar Sales Any Merch                 | base\_dollar\_sales\_any\_merch                   |
| Base Dollar Sales Any Merch Year Ago        | base\_dollar\_sales\_any\_merch\_year\_ago        |
| Weeks in Distribution                       | weeks\_in\_distribution                           |
| Weeks in Distribution Year Ago              | weeks\_in\_distribution\_year\_ago                |
| Number of Stores Selling                    | number\_of\_stores\_selling                       |
| Number of Stores Selling Year Ago           | number\_of\_stores\_selling\_year\_ago            |
| Daasity: timestamp when loaded into DB      | loaded\_at                                        |

### HEB Circana Products

**Source:** CSV file upload (`heb_circana_products*.csv`)

**Update Method:** UPSERT

**Table Name:** `retail.heb_circana_products`

**Contains:** Product dimension data including UPC, brand, category, and product attributes

| CSV Column                             | Database Column  |
| -------------------------------------- | ---------------- |
| Geography                              | geography        |
| Time                                   | time             |
| Product                                | product          |
| UPC 10 digit                           | upc\_10\_digit   |
| Brand                                  | brand            |
| Brand Franchise                        | brand\_franchise |
| Category                               | category         |
| Subcategory                            | subcategory      |
| Manufacturer                           | manufacturer     |
| Daasity: timestamp when loaded into DB | loaded\_at       |
