# PMS_GROUPSERVICE

> Describe the services a group provides and its relation to a market

## Column Schema

### GROUPSERVICEID

> Record identifier of the Service allocated to the Group. When data is updated, existing record identifier is terminated, and new record identifier(s) are allocated.

SQL Type: `NUMBER(20,0)`
Polars Type: `pl.Int128`

This column is mandatory, and a primary key.

Examples:
`9`, `855`

### APPROVEDDATE

> Date which this record was approved

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2021/10/22 10:36:55.207`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

### ENDDATE

> Effective date of when this service ended operation. Will be set to max date 9999/12/31 23:59:59.999 until its service ends or a change to the service is required.

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `9999/12/31 23:59:59.997`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

### ENTITYID

> Describe the entity ID in the market that it will be operating in. Will only contain the DUID of the group initially.

SQL Type: `VARCHAR2(50)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `DRVIOT06`
- `DRVIOT07`
- `DRVISB01`
- `DRXNAD01`
- `DRXNAE01`
- `DRXNDA01`
- `DRXNDA02`
- `DRXNDA03`
- `DRXNDA04`
- `DRXNDB04`

### ENTITYTYPE

> Describes the entity that is operating. Will only be WDRU initially.

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

This column is not mandatory.

Example: `WDRU`

### GROUPID

> Group id of the Group where the Service is attached to.

SQL Type: `NUMBER(20,0)`
Polars Type: `pl.Int128`

This column is not mandatory.

Examples:
`3`, `273`

### LASTCHANGED

> Date time which record was last changed

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

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2026/10/08 17:00:02.470`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

### MARKET

> Market that this group is operating its service in. Will only be NEM initially.

SQL Type: `VARCHAR2(50)`
Polars Type: `str`

This column is not mandatory.

Example: `NEM`

### MAXIMUMRAMPRATEPERMIN

> Maximum ramp rate MW per minute of the service.

SQL Type: `NUMBER(10,0)`
Polars Type: `pl.Int64`

This column is not mandatory.

Examples:
`1`, `40`

### MRC

> Maximum responsive component for the service offering

SQL Type: `NUMBER(10,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`1`, `200`

### MRCREASON

> Reason for the MRC.

SQL Type: `VARCHAR2(500)`
Polars Type: `str`

This column is not mandatory.

### REGION

> Region the group is operating this service in One of NSW1, QLD1, VIC1, SA1 or TAS1

SQL Type: `VARCHAR2(20)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `NSW1`
- `QLD1`
- `SA1`
- `VIC1`

### SERVICETYPE

> Service that this group is operating. Will be only be ENERGY initially

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

This column is not mandatory.

Example: `ENERGY`

### STARTDATE

> Effective date of when this service started operation

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2021/10/24 00:00:00.000`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

### VERSIONFROM

> Date for which this version is effective from.

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2021/10/22 10:36:55.207`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

### VERSIONTO

> Date for which this version is effective to. Will be set to max date 9999/12/31 23:59:59.999 until this version ends or a change to the version is required.

SQL Type: `TIMESTAMP(3)`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2022/06/03 17:30:14.690`

Unlike most datetime columns, this one includes a millisecond component.
e.g. `2029/03/15 00:00:00.123`.

## New Data Timing

> When the group service data is created or updated

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

# for "TIMESTAMP" columns
# Note that Polars uses slightly different format strings for fractional seconds to `dt.strptime`
# e.g. "2029/03/15 00:00:00.123".
dt_ms_fmt = "%Y/%m/%d %H:%M:%S%.3f"

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(
            "APPROVEDDATE",
            "ENDDATE",
            "LASTCHANGED",
            "STARTDATE",
            "VERSIONFROM",
            "VERSIONTO",
        ).str.strptime(pl.Datetime, dt_ms_fmt),
    )
    .cast(
        {
            "GROUPSERVICEID": int,  # or pl.Int128
            "ENTITYID": str,
            "ENTITYTYPE": pl.Categorical,
            "GROUPID": int,  # or pl.Int128
            "MARKET": str,
            "MAXIMUMRAMPRATEPERMIN": int,  # or pl.Int64
            "MRC": pl.Float64,
            "MRCREASON": str,
            "REGION": str,
            "SERVICETYPE": pl.Categorical,
        }
    )
    # Deduplicate
    # We want one row per ['GROUPSERVICEID']
    # Tie-breaker: greatest value of ['ENTITYID', 'GROUPID']
    .sort(["ENTITYID", "GROUPID"], descending=False)
    .unique(subset=["GROUPSERVICEID"], keep="last")
)

```

### Nemosis

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

## Example File

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

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_PMS_GROUPSERVICE,AEMO,PUBLIC,2026/10/09,16:26:47,001791527207135,MONTHLY_ARCHIVE,001791527207135
    I,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,GROUPSERVICEID,GROUPID,VERSIONFROM,VERSIONTO,STARTDATE,ENDDATE,MARKET,SERVICETYPE,ENTITYTYPE,ENTITYID,MRC,MRCREASON,MAXIMUMRAMPRATEPERMIN,REGION,APPROVEDDATE,LASTCHANGED
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,111,43,"2022/08/05 11:16:16.573","2022/11/30 09:50:22.207","2022/08/09 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXQDA01,4,,1,QLD1,"2022/08/05 11:16:16.573","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,375,30,"2024/10/17 13:28:35.140","9999/12/31 23:59:59.997","2024/07/03 00:00:00.000","2024/10/21 00:00:00.000",NEM,ENERGY,WDRU,DRXVQX01,1,,1,VIC1,"2024/07/01 11:14:57.500","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,376,30,"2024/10/17 13:28:35.140","2025/11/05 11:26:21.980","2024/10/21 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXVQX01,1,,1,VIC1,"2024/10/17 13:28:35.140","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,701,43,"2026/03/30 10:06:12.310","9999/12/31 23:59:59.997","2025/12/06 00:00:00.000","2026/03/31 00:00:00.000",NEM,ENERGY,WDRU,DRXQDA01,3,,1,QLD1,"2025/12/05 14:31:16.300","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,702,43,"2026/03/30 10:06:12.310","9999/12/31 23:59:59.997","2026/03/31 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXQDA01,4,,1,QLD1,"2026/03/30 10:06:12.310","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,703,18,"2026/03/30 14:57:09.183","9999/12/31 23:59:59.997","2023/10/30 00:00:00.000","2026/03/31 00:00:00.000",NEM,ENERGY,WDRU,DRXVDX01,2,,1,VIC1,"2023/10/27 09:59:13.600","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,704,18,"2026/03/30 14:57:09.183","2026/07/13 16:43:13.737","2026/03/31 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXVDX01,3,,1,VIC1,"2026/03/30 14:57:09.183","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,724,23,"2026/05/15 11:53:42.887","9999/12/31 23:59:59.997","2025/06/10 00:00:00.000","2026/05/19 00:00:00.000",NEM,ENERGY,WDRU,DRXVDP01,3,,1,VIC1,"2025/06/06 15:07:44.677","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,725,23,"2026/05/15 11:53:42.887","9999/12/31 23:59:59.997","2026/05/19 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXVDP01,3,,1,VIC1,"2026/05/15 11:53:42.887","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,726,35,"2026/05/15 12:28:36.603","9999/12/31 23:59:59.997","2024/07/16 00:00:00.000","2026/05/19 00:00:00.000",NEM,ENERGY,WDRU,DRXNQX01,3,,1,NSW1,"2024/07/12 12:27:21.927","2026/10/08 17:00:02.470"
    D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,727,35,"2026/05/15 12:28:36.603","2026/07/06 16:27:33.183","2026/05/19 00:00:00.000","9999/12/31 23:59:59.997",NEM,ENERGY,WDRU,DRXNQX01,2,,1,NSW1,"2026/05/15 12:28:36.603","2026/10/08 17:00:02.470"
    ...
    C,"END OF REPORT",182
    ```

## 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/PMS_GROUPSERVICE.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
58 KB when zipped,
581 KB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`GROUPSERVICEID`](#groupserviceid)

The transaction type is ["UPDATE-INSERT"](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 |
|---------------|-------------------|-----------|
| PARTICIPANT_REGISTRATION | PMS_GROUPSERVICE  | 1 |

This means that the CSV files start with metadata columns:

```csv
I,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,...
D,PARTICIPANT_REGISTRATION,PMS_GROUPSERVICE,1,...
```

`ROW_FILTER_TYPE` is LASTCHANGED

## Indexes

- [`ENTITYID`](#entityid)

- [`GROUPID`](#groupid)

## Links

[This page as JSON](../json/tables/PMS_GROUPSERVICE/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/PMS_GROUPSERVICE/json-schema.json) specification for this table.

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

## Other Information

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