Skip to main content

DNV Meter Device Implementation Plan

Overview

This document tracks the implementation progress for integrating water meter device data from two sources:

  1. Timeseries CSV - Dynamic consumption data
  2. Shapefile - Static device information

Data Sources

Timeseries CSV Fields

FieldOriginal NameData TypeSample ValueModel CoverageStatus
AccountACCOUNTstring10001✅ Device.AccountNumberComplete
Route CategoryROUTE_CATEGORYstringMETERED - MONTHLY✅ DeviceGroup.NameComplete
Billing CycleBILLING_CYCLEstringMETERED - MONTHLY✅ DeviceGroup.BillingCycleComplete
Serial NumberREG_SERIALstring70093784A✅ Device.SerialNumberComplete
Reading YearREADING_YEARint2014✅ DeviceTagDatum.ReadingYearComplete
Reading PeriodREADING_PERIODint12✅ DeviceTagDatum.ReadingPeriodComplete
ConsumptionCONSUMPTIONdouble1112500✅ DeviceTagDatum.ValueComplete

Shapefile Fields

High Priority Fields (Essential for Operations)

FieldOriginal NameData TypeSample ValueModel CoverageStatus
Asset IDAsset_IDstringWTRMTR00001✅ Device.AssetIdComplete
Meter SerialMeterSeriastring51846999A✅ Device.SerialNumberComplete
AddressAddressstring1583 GARDEN AVE✅ Device.AddressComplete
LocationLocationstringIn Manhole At Curb In Backlane✅ Device.LocationComplete
Meter TypeMeterTypestringT10✅ Device.MeterTypeComplete
OwnerAM_OwnerstringDNV✅ Device.OwnerComplete
DepartmentAM_DeptstringUTILS_DEPT✅ Device.DepartmentComplete
Contact NameContactNamstring-✅ Device.ContactNameComplete
Contact NumberContactNumstring-✅ Device.ContactNumberComplete
X CoordinatePOINT_Xdouble-✅ Device.XCoordComplete
Y CoordinatePOINT_Ydouble-✅ Device.YCoordComplete

Medium Priority Fields (Operational Support)

FieldOriginal NameData TypeSample ValueModel CoverageStatus
High Flow Radio IDHF_RadioIDlong1540560424❌ Not ImplementedPending
Low Flow Radio IDLF_RadioIDlong-❌ Not ImplementedPending
High Flow ReadingHF_Readingdouble-❌ Not ImplementedPending
Low Flow ReadingLF_Readingdouble27396❌ Not ImplementedPending
Bypass RequiredBypassReqstringNo❌ Not ImplementedPending
CommentsCommentsstring-❌ Not ImplementedPending
Asset SizeAM_Sizeint2❌ Not ImplementedPending
Size CommentSizeCommenstring-❌ Not ImplementedPending

Low Priority Fields (Administrative/Historical)

FieldOriginal NameData TypeSample ValueModel CoverageStatus
InspectorInspectorstringJordie❌ DeviceInstallation.InspectorPlanned
Data GathererMet_Gatherstring-❌ DeviceMetadata.MetGatherPlanned
Data FormatMet_Formatstring-❌ DeviceMetadata.MetFormatPlanned
Data DonorMet_Donorstring-❌ DeviceMetadata.MetDonorPlanned
Data InputMet_Inputstring-❌ DeviceMetadata.MetInputPlanned
Data TechnologyMet_Techstring-❌ DeviceMetadata.MetTechPlanned
Data MethodMet_Methodstring-❌ DeviceMetadata.MetMethodPlanned
Override ByMET_Ovr_Bystring-❌ DeviceMetadata.MetOvrByPlanned
Override TypeMET_Ovr_Tystring-❌ DeviceMetadata.MetOvrTyPlanned
Created Bycreated_usstringwater9@dnv.org❌ DeviceAudit.CreatedByPlanned
Created Datecreated_daDateTime2024-04-03 0:00:00❌ DeviceAudit.CreatedDatePlanned
Last Edited Bylast_editestringSDE_STORMK❌ DeviceAudit.LastEditedByPlanned
Last Edited Datelast_edi_1DateTime2022-05-05 0:00:00❌ DeviceAudit.LastEditedDatePlanned
Global IDGlobalIDstring{D0EA84C8-6B2A-4AB2-9311-09BA7F0DB646}❌ DeviceAudit.GlobalIdPlanned

Implementation Progress

✅ Completed (Phase 1)

  • Core Device model structure
  • DeviceType model with Description and Unit fields
  • DeviceGroup model with BillingCycle and Frequency fields
  • DeviceTag model with TagType and Unit fields
  • DeviceTagDatum model with composite key and time handling
  • Navigation properties for all models
  • All timeseries CSV field mappings
  • High priority shapefile field mappings
  • Coordinate fields (XCoord, YCoord)

🚧 In Progress (Phase 2)

  • Medium priority shapefile fields implementation
  • Additional Device model fields for operational support

📋 Planned (Phase 3)

  • DeviceInstallation model for installation tracking
  • DeviceMetadata model for technical specifications
  • DeviceAudit model for data governance
  • Low priority shapefile field mappings

Data Integration Strategy

Critical Join Key

  • Timeseries CSV.REG_SERIALShapefile.MeterSeriaDevice.SerialNumber

Data Transformation Pipeline

  1. Parse Shapefile → Create/Update Device records with static information
  2. Parse Timeseries CSV → Create DeviceTagDatum records with consumption data
  3. Join Operations → Link consumption data to devices via SerialNumber
  4. Validation → Ensure data integrity and completeness

Next Steps

Immediate (Phase 2)

  1. Add medium priority fields to Device model:
    • HighFlowRadioId, LowFlowRadioId
    • HighFlowReading, LowFlowReading
    • BypassRequired, Comments
    • Size, SizeComment

Future (Phase 3)

  1. Create DeviceInstallation model
  2. Create DeviceMetadata model
  3. Create DeviceAudit model
  4. Implement remaining low priority fields

Model Relationships

Device (1) ←→ (M) DeviceTag
Device (M) ←→ (1) DeviceType
Device (M) ←→ (1) DeviceGroup
DeviceTag (1) ←→ (M) DeviceTagDatum
Device (1) ←→ (M) DeviceInstallation [Planned]
Device (1) ←→ (1) DeviceMetadata [Planned]
Device (1) ←→ (M) DeviceAudit [Planned]

Success Criteria

  • All timeseries CSV data can be stored and queried
  • All high priority shapefile data can be stored and queried
  • Data can be joined between sources via SerialNumber
  • All medium priority operational fields are implemented
  • Full audit trail and metadata tracking is available
  • Performance is optimized for large datasets
  • Data validation rules are implemented