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

# stg_events

> Race-level events (damage, retirements, penalties) sourced from the raw_dim_events seed.

<Note>Part of the [Staging](/transform/families/staging) family.</Note>

Race-level events (damage, retirements, penalties) sourced from the raw\_dim\_events seed. Currently manual entries for 2021 only   expand as automated detection is built.

## Lineage

```mermaid theme={null}
flowchart LR
  stg_events
  style stg_events fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

| Property          | Value                                  |
| ----------------- | -------------------------------------- |
| Layer             | `staging`                              |
| Family            | [Staging](/transform/families/staging) |
| Contract enforced | No                                     |

**2 tests** [guard](/transform/ci/overview) this model  -  2 generic, 0 singular.

## Columns

| Column                  | Type      | Nullable | Tests                                                                        | Description                                                   |
| ----------------------- | --------- | -------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------- |
| `stg_event_id`          | `varchar` | Yes      | [`not_null`](/transform/ci/structural), [`unique`](/transform/ci/structural) | Surrogate key   \{race\_id}\_\{event\_id}.                    |
| `event_id`              | `varchar` | Yes      |                                                                              | Seed-level event identifier.                                  |
| `race_id`               | `integer` | Yes      |                                                                              | Race identifier from the seed (numeric).                      |
| `driver_id`             | `varchar` | Yes      |                                                                              | Driver the event affects (FastF1 three-letter code).          |
| `event_type`            | `varchar` | Yes      |                                                                              | Event category label (e.g. damage, retirement, penalty).      |
| `event_severity`        | `double`  | Yes      |                                                                              | Magnitude estimate of the event's impact.                     |
| `source`                | `varchar` | Yes      |                                                                              | Provenance of the event row (constant 'manual' for the seed). |
| `is_performance_impact` | `boolean` | Yes      |                                                                              | TRUE when the event degrades on-track performance.            |
| `is_reliability_impact` | `boolean` | Yes      |                                                                              | TRUE when the event is a reliability/mechanical issue.        |
