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

# Example data

> Live table examples use Hub's Lakekeeper Iceberg REST catalog and MinIO storage. Hub runs separately from the engine through Docker Compose. Follow Hub setup to start the services,

ReferenceApplies to: Unified engine deployments

Live table examples use Hub's Lakekeeper Iceberg REST catalog and MinIO storage. Hub runs separately from the engine through Docker Compose. Follow Hub setup to start the services, generate the data, and connect the catalog.

## TPC-DS SF1

Run the full SF1 command in Hub setup to generate all rows for the seven tables below. Each generation uses a separate namespace. Use that namespace in your SQL client and check that the tables exist. Source tables remain separate from the write lab.

| Table | Meaning | SF1 rows |
| - | - | -: |
| `store_sales` | Store sale line items | 2,880,404 |
| `date_dim` | Calendar dates | 73,049 |
| `item` | Item attributes and prices | 18,000 |
| `store` | Store attributes | 12 |
| `customer` | Customer attributes | 100,000 |
| `customer_address` | Customer addresses | 50,000 |
| `promotion` | Promotion attributes | 300 |

Examples show sample tables as `demo.tpcds.item`, `demo.tpcds.store_sales`, and so on. Replace these names with the catalog and namespace of your TPC-DS SF1 dataset. This keeps the SQL readable when the dataset changes.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT COUNT(*) AS item_count FROM demo.tpcds.item;
```

## Useful relationships

| From | To | Join condition |
| - | - | - |
| Store sale | Item | `ss_item_sk = i_item_sk` |
| Store sale | Sold date | `ss_sold_date_sk = d_date_sk` |
| Store sale | Store | `ss_store_sk = s_store_sk` |
| Store sale | Customer | `ss_customer_sk = c_customer_sk` |
| Store sale | Promotion | `ss_promo_sk = p_promo_sk` |
| Customer | Current address | `c_current_addr_sk = ca_address_sk` |

Sales can contain null foreign keys. Choose an outer join when those sales should remain in the result. An inner join keeps only matching rows.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT c.c_customer_id, c.c_first_name, a.ca_city, a.ca_state
FROM demo.tpcds.customer AS c
LEFT JOIN demo.tpcds.customer_address AS a
  ON c.c_current_addr_sk = a.ca_address_sk
ORDER BY c.c_customer_sk
LIMIT 10;
```

## Write lab

Create a private namespace and an `items` table containing item keys 1–20 from SF1. Its columns are `i_item_sk`, `i_item_id`, `i_category`, and `price` (`DOUBLE`). Published write examples target this namespace. Examples that recreate a table explain that behavior before the SQL. Remove only your private lab objects when you finish; keep the source SF1 tables.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT i_item_sk, i_item_id, i_category, price
FROM demo.examples.items
ORDER BY i_item_sk;
```

Run related statements in order in the same SQL session and stop at the first failure. Inspect each statement's result.


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