From 47d00a52ccbe6e67d16ff6b1d75fb1f1d6866990 Mon Sep 17 00:00:00 2001 From: Declan Heim Date: Tue, 6 Dec 2022 16:10:09 +1100 Subject: [PATCH 1/2] Update defaults.py includes GENUNITS table in defaults.py --- nemosis/defaults.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nemosis/defaults.py b/nemosis/defaults.py index a9a57ba..9b1a9e6 100644 --- a/nemosis/defaults.py +++ b/nemosis/defaults.py @@ -6,6 +6,7 @@ "DUDETAIL": "PUBLIC_DVD_DUDETAIL", "DISPATCHCONSTRAINT": "PUBLIC_DVD_DISPATCHCONSTRAINT", "GENCONDATA": "PUBLIC_DVD_GENCONDATA", + "GENUNITS": "PUBLIC_DVD_GENUNITS", "DISPATCH_UNIT_SCADA": "PUBLIC_DVD_DISPATCH_UNIT_SCADA", "DISPATCHPRICE": "PUBLIC_DVD_DISPATCHPRICE", "SPDREGIONCONSTRAINT": "PUBLIC_DVD_SPDREGIONCONSTRAINT", @@ -44,6 +45,7 @@ "DUDETAIL": "MMS", "DISPATCHCONSTRAINT": "MMS", "GENCONDATA": "MMS", + "GENUNITS": "MMS", "DISPATCH_UNIT_SCADA": "MMS", "DISPATCHPRICE": "MMS", "SPDREGIONCONSTRAINT": "MMS", @@ -144,6 +146,7 @@ "DUDETAIL": "aemo_data_url", "DISPATCHCONSTRAINT": "aemo_data_url", "GENCONDATA": "aemo_data_url", + "GENUNITS": "aemo_data_url", "DISPATCH_UNIT_SCADA": "aemo_data_url", "DISPATCHPRICE": "aemo_data_url", "SPDREGIONCONSTRAINT": "aemo_data_url", @@ -374,6 +377,19 @@ "LIMITTYPE", "REASON", ], + "GENUNITS": [ + "GENSETID", + "LASTCHANGED", + "VOLTLEVEL", + "REGISTEREDCAPACITY", + "DISPATCHTYPE", + "STARTTYPE", + "MAXCAPACITY", + "GENSETTYPE", + "CO2E_EMISSIONS_FACTOR", + "CO2E_ENERGY_SOURCE", + "CO2E_DATA_SOURCE" + ], "DISPATCH_UNIT_SCADA": ["SETTLEMENTDATE", "DUID", "SCADAVALUE"], "DUDETAIL": [ "EFFECTIVEDATE", @@ -692,6 +708,7 @@ "VERSIONNO", ], "GENCONDATA": ["GENCONID", "EFFECTIVEDATE", "VERSIONNO"], + "GENUNITS": ["GENSETID", "LASTCHANGED", "CO2E_EMISSIONS_FACTOR"], "MNSP_PEROFFER": [ "SETTLEMENTDATE", "OFFERDATE", @@ -783,6 +800,7 @@ "DUDETAIL": "EFFECTIVEDATE", "DISPATCHCONSTRAINT": "SETTLEMENTDATE", "GENCONDATA": "EFFECTIVEDATE", + "GENUNITS": "LASTCHANGED", "DISPATCH_UNIT_SCADA": "SETTLEMENTDATE", "DISPATCHPRICE": "SETTLEMENTDATE", "SPDREGIONCONSTRAINT": "EFFECTIVEDATE", From 6922f849455af28036017c585d75d6aa55948b36 Mon Sep 17 00:00:00 2001 From: Declan Heim Date: Tue, 6 Dec 2022 16:12:14 +1100 Subject: [PATCH 2/2] Update processing_info_maps.py include GENUNITS table in processing_info_maps.py --- nemosis/processing_info_maps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nemosis/processing_info_maps.py b/nemosis/processing_info_maps.py index f24e63f..8923af7 100644 --- a/nemosis/processing_info_maps.py +++ b/nemosis/processing_info_maps.py @@ -22,6 +22,7 @@ "DUDETAILSUMMARY": None, "DUDETAIL": None, "GENCONDATA": None, + "GENUNITS": None, "SPDREGIONCONSTRAINT": None, "SPDCONNECTIONPOINTCONSTRAINT": None, "SPDINTERCONNECTORCONSTRAINT": None, @@ -58,6 +59,7 @@ "DUDETAILSUMMARY": "end", "DUDETAIL": "all", "GENCONDATA": "all", + "GENUNITS": "start_to_end", "SPDREGIONCONSTRAINT": "all", "SPDCONNECTIONPOINTCONSTRAINT": "all", "SPDINTERCONNECTORCONSTRAINT": "all", @@ -94,6 +96,7 @@ "DUDETAILSUMMARY": ["START_DATE", "END_DATE"], "DUDETAIL": ["EFFECTIVEDATE"], "GENCONDATA": ["EFFECTIVEDATE"], + "GENUNITS": ["LASTCHANGED"], "SPDREGIONCONSTRAINT": ["EFFECTIVEDATE"], "SPDCONNECTIONPOINTCONSTRAINT": ["EFFECTIVEDATE"], "SPDINTERCONNECTORCONSTRAINT": ["EFFECTIVEDATE"], @@ -130,6 +133,7 @@ "DUDETAILSUMMARY": filters.filter_on_start_and_end_date, "DUDETAIL": filters.filter_on_effective_date, "GENCONDATA": filters.filter_on_effective_date, + "GENUNITS": filters.filter_on_last_changed, "SPDREGIONCONSTRAINT": filters.filter_on_effective_date, "SPDCONNECTIONPOINTCONSTRAINT": filters.filter_on_effective_date, "SPDINTERCONNECTORCONSTRAINT": filters.filter_on_effective_date, @@ -177,6 +181,7 @@ query_wrappers.most_recent_records_before_start_time, query_wrappers.drop_duplicates_by_primary_key, ], + "GENUNITS": [query_wrappers.drop_duplicates_by_primary_key], "SPDREGIONCONSTRAINT": [query_wrappers.most_recent_records_before_start_time], "SPDCONNECTIONPOINTCONSTRAINT": [ query_wrappers.most_recent_records_before_start_time,