# MARKET_SUSPEND_SCHEDULE

> Trading prices that will apply in the event of a market suspension event updated weekly.

> MARKET_SUSPEND_SCHEDULE is public data, so is available to all
> participants.

## Column Schema

### DAY_TYPE

> Distinguishes which record set to apply - at time of writing this was Business or Non-business day but may change in the future depending on outcome of consultation

SQL Type: `VARCHAR2(20)`
Polars Type: `pl.Categorical`

This column is mandatory, and a primary key.

Examples:

- `BUS_DAY`
- `NON_BUS_DAY`

### EFFECTIVEDATE

> Calendar date from when this record set is effective

SQL Type: `DATE`
Polars Type: `pl.Date()`

This column is mandatory, and a primary key.

Example: `2017/12/25 00:00:00`

Note that AEMO represents dates as datetimes with a midnight time component.

### PERIODID

> 48 intervals for a day, midnight base (equates to 00:30 - 00:00)

SQL Type: `NUMBER(3,0)`
Polars Type: `pl.Int16`

This column is mandatory, and a primary key.

Examples:
`1`, `48`

### REGIONID

> Region affected.

For more information, see the [dedicated documentation page](../../guide/querying.md#region-id).

The SQL type is `VARCHAR2(20)`.
This is actually a factor/enum, with values:

- `QLD1`

- `VIC1`

- `TAS1`

- `NSW1`

- `SA1`

- `SNOWY1`

This column is mandatory, and a primary key.

### ENERGY_RRP

> Energy Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`27.2`, `60`, `1184.65`, `106`

### L1_RRP

> Lower 1Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

### L5_RRP

> Lower 5Min contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`0.04`, `1`, `1.9`

### L6_RRP

> Lower 6Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`0.01`, `0`, `10.7`

### L60_RRP

> Lower 60Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`0.01`, `0`, `2`, `17.75`

### LASTCHANGED

> Last date and time record changed

For more information, see the [dedicated documentation page](../../guide/querying.md#deduplication).

SQL Type: `DATE`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2017/12/18 11:49:38`

### LREG_RRP

> Lower Regulation Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`6.77`, `15`, `58.52`, `22`

### R1_RRP

> Raise 1Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

### R5_RRP

> Raise 5Min contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`1.3`, `2`, `16.96`, `12`

### R6_RRP

> Raise 6Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`0.99`, `7`, `390.08`, `51`

### R60_RRP

> Raise 60Sec contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`0.67`, `1`, `268.04`, `7`

### RREG_RRP

> Raise Regulation contingency Price applied for this period for this Day Type

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`10.71`, `17`, `132.85`, `28`

## New Data Timing

> Weekly and ad hoc

## Code Examples

### Polars

Explicitly listing every column, casting to enums, categoricals etc is not essential, but may speed up parsing.
Swapping `int` for `pl.UInt16`, `pl.Int32` would also speed up parsing. However some of the datatypes are inferred, so they may be wrong.

This code deduplicates for you.
Deduplication is normally only required across multiple months.

This code assumes that all columns are present, which may not be true for older files.

```python
import polars as pl
import polars.selectors as cs

# e.g. "2029/03/15 00:05:00"
dt_s_fmt = "%Y/%m/%d %H:%M:%S"

# Dates are represented as datetimes at midnight

d_fmt = "%Y/%m/%d 00:00:00"

csv_paths = ["SOMEFILE.CSV", "OTHERFILE.CSV"]

lf = (
    pl.concat(
        [
            pl.scan_csv(
                csv_path,  # must be unzipped beforehand
                skip_rows=1,  # skip the header
                infer_schema=False,  # much faster
            )
            .filter(cs.by_index(0) == "D")  # drop the footer
            .select(~cs.by_index(range(4)))  # drop metadata columns
            for csv_path in csv_paths
        ],
        how="diagonal_relaxed",
    )
    .with_columns(
        pl.col("LASTCHANGED").str.strptime(pl.Datetime, dt_s_fmt),
        pl.col("EFFECTIVEDATE").str.strptime(pl.Date, d_fmt),
    )
    .cast(
        {
            "DAY_TYPE": pl.Categorical,
            "EFFECTIVEDATE": pl.Date(),
            "PERIODID": int,  # or pl.Int16
            "REGIONID": pl.Enum(["QLD1", "VIC1", "TAS1", "NSW1", "SA1", "SNOWY1"]),
            "ENERGY_RRP": pl.Float64,
            "L1_RRP": pl.Float64,
            "L5_RRP": pl.Float64,
            "L6_RRP": pl.Float64,
            "L60_RRP": pl.Float64,
            "LREG_RRP": pl.Float64,
            "R1_RRP": pl.Float64,
            "R5_RRP": pl.Float64,
            "R6_RRP": pl.Float64,
            "R60_RRP": pl.Float64,
            "RREG_RRP": pl.Float64,
        }
    )
    # Deduplicate
    # We want one row per ['DAY_TYPE', 'EFFECTIVEDATE', 'PERIODID', 'REGIONID']
    # Tie-breaker: greatest value of LASTCHANGED
    .sort(LASTCHANGED, descending=False)
    .unique(subset=["DAY_TYPE", "EFFECTIVEDATE", "PERIODID", "REGIONID"], keep="last")
)

```

### Nemosis

This table is not yet available in [Nemosis](https://github.com/UNSW-CEEM/NEMOSIS/#static_table).

## Example File

From [PUBLIC_ARCHIVE_MARKET_SUSPEND_SCHEDULE_FILE01_202609010000.zip](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/2026/MMSDM_2026_09/MMSDM_Historical_Data_SQLLoader/DATA/PUBLIC_ARCHIVE%23MARKET_SUSPEND_SCHEDULE%23FILE01%23202609010000.zip)

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_MARKET_SUSPEND_SCHEDULE,AEMO,PUBLIC,2026/10/09,15:53:07,001791525187848,MONTHLY_ARCHIVE,001791525187848
    I,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,EFFECTIVEDATE,DAY_TYPE,REGIONID,PERIODID,ENERGY_RRP,R6_RRP,R60_RRP,R5_RRP,RREG_RRP,L6_RRP,L60_RRP,L5_RRP,LREG_RRP,LASTCHANGED,L1_RRP,R1_RRP
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,21,73.79,8.1,2.73,5.98,23.92,0,0.02,0.16,17.26,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,22,77.5,11.82,4.56,6.64,27.95,0,0.02,0.17,16.98,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,23,73.89,8.33,2.92,5.52,26.62,0,0.02,0.18,18.1,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,24,78.49,9.24,3.39,7.73,28.27,0,0.02,0.15,17.2,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,25,79.5,9.94,3.65,7.52,28.81,0,0.02,0.17,17.7,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,26,81.83,10.36,4.89,6.48,31.32,0,0.02,0.15,16.94,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,27,87.13,10.29,4.65,8.28,34.45,0,0.02,0.15,17.25,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,28,86.4,12.18,5.09,9.91,34.65,0,0.02,0.15,17.48,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,29,85,11.02,5.45,12,38.47,0,0.02,0.14,17.02,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,30,86.27,10.03,3.97,12.85,42.37,0,0.02,0.14,17.34,"2018/01/07 09:48:32",,
    D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,"2018/01/22 00:00:00",BUS_DAY,QLD1,31,95.51,10.36,3.68,10.34,44.92,0,0.01,0.13,16.52,"2018/01/07 09:48:32",,
    ...
    C,"END OF REPORT",1003
    ```

## Availability

Visibility: Public

This table is in the public monthly [MMSDM archive](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/).

I have collated the list of all those files into one place, in [this CSV metadata file](../../manifests/per_table/csv/MARKET_SUSPEND_SCHEDULE.csv). (Columns `year`, `month`, `url`, `compressed_size` in bytes).

The earliest available data is month 8 of 2024.
The most recent available data is month 9 of 2026.

 Every month in between has a file. (No gaps.)

## Data Size

Each year of data is approximately
54 MB when zipped,
541 MB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`DAY_TYPE`](#day_type)

- [`EFFECTIVEDATE`](#effectivedate)

- [`PERIODID`](#periodid)

- [`REGIONID`](#regionid)

The transaction type is ["INSERT-UPDATE"](https://di-help.docs.public.aemo.com.au/Content/pdrLoader/How_it_works.htm?TocPath=pdrLoader%7CAbout+pdrLoader%7C_____5#UPDATEINSERT), which means that you will likely see duplicate data with different values.

You should deduplicate by sorting based on `LASTCHANGED`, within each group of primary keys.

[PDR Loader configuration](https://nemweb.com.au/Reports/Current/MMSDataModelReport/PDRCONFIG/PROD_PUBLIC_PDR_CONFIG_FULL.zip) is:

| Report Name | Report Subtype | Version |
|---------------|-------------------|-----------|
| FORCE_MAJEURE | MARKET_SUSPEND_SCHEDULE  | 1 |
| FORCE_MAJEURE | MARKET_SUSPEND_SCHEDULE  | 2 |

This means that the CSV files start with metadata columns:

```csv
I,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,1,...
D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,1,...
```

or

```csv
I,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,...
D,FORCE_MAJEURE,MARKET_SUSPEND_SCHEDULE,2,...
```

`ROW_FILTER_TYPE` is LASTCHANGED

## Links

[This page as JSON](../json/tables/MARKET_SUSPEND_SCHEDULE/bespoke.json) (schema documented [here](https://gitlab.com/MatthewDavis/mms-schema/-/blob/master/schema.py?ref_type=heads), but may change)

Download a [JSON Schema](../json/tables/MARKET_SUSPEND_SCHEDULE/json-schema.json) specification for this table.

[Official AEMO schema documentation](https://nemweb.com.au/Reports/Current/MMSDataModelReport/Electricity/ElectricityDataModelReport_files/Elec25.htm#49)

## Other Information

Package: [FORCE_MAJEURE](../packages/FORCE_MAJEURE.md)
