> ## 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_session_status_qualifying

> Session lifecycle events for the qualifying session, mirroring stg_session_status.

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

Session lifecycle events for the qualifying session, mirroring stg\_session\_status. This is the only record of where Q1, Q2 and Q3 begin and end   FastF1 reports one flat lap set per Q session with no segment column   so int\_qualifying\_segments splits the session on the Started / Finished pairs here. 'Aborted' marks a red-flag stoppage inside a segment.

## Lineage

```mermaid theme={null}
flowchart LR
  stg_session_status_qualifying --> int_qualifying_segments
  style stg_session_status_qualifying fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

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

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

## Columns

| Column              | Type      | Nullable | Tests                                  | Description                                                                                                                                                |
| ------------------- | --------- | -------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `session_status_id` | `varchar` | Yes      | [`not_null`](/transform/ci/structural) | Surrogate key   \{race\_id}*Q*\{session\_time\_s}.                                                                                                         |
| `race_year`         | `integer` | Yes      | [`not_null`](/transform/ci/structural) | Season year.                                                                                                                                               |
| `race_id`           | `varchar` | Yes      | [`not_null`](/transform/ci/structural) | Numeric FastF1 event id cast to string; matches stg\_laps\_qualifying.race\_id.                                                                            |
| `race_slug`         | `varchar` | Yes      |                                        | Human-readable event name.                                                                                                                                 |
| `session_type`      | `varchar` | Yes      |                                        | Constant 'Q' marking the qualifying session.                                                                                                               |
| `session_time_s`    | `double`  | Yes      | [`not_null`](/transform/ci/structural) | Session clock (s) at the lifecycle event.                                                                                                                  |
| `status`            | `varchar` | Yes      |                                        | Raw FastF1 session status ('Started', 'Aborted', 'Finished', ...).                                                                                         |
| `is_red_flag_stop`  | `boolean` | Yes      |                                        | TRUE when status is 'Aborted' (a red-flag stoppage).                                                                                                       |
| `is_green_light`    | `boolean` | Yes      |                                        | TRUE when status is 'Started'. Raw event, NOT one per segment: a red flag inside a segment is written 'Aborted' and the resumption is another 'Started'.   |
| `is_chequered_flag` | `boolean` | Yes      |                                        | TRUE when status is 'Finished'. Usually three per session, but a segment red-flagged at its end never gets one   the session goes straight to 'Finalised'. |
