Skip to content

Update relational schema: spec gaps, case mismatches, RI staging, PV fields, account terms, step functions #279

Description

@benhayes21

Gap analysis between OEDInputFields.csv and DatabaseProjectOED.sql identified several issues to fix:

  1. Add PV fields (PVControlType, PVGlassThickness, PVMaterial, PVMounting, PVPanelArea, PVPanelAreaUnit, PVPanelYear, PVStowing, PVTiltAngle) to _import_location and LocationDetail
  2. Implement Account-level financial terms (AccDed*/AccLimit*) - AccountTerm table exists but usp_Terms_Load has a TODO comment with no implementation
  3. Fix 122 systematic case mismatches (BI->Bi, PD->Pd, XX->Xx, TIV->Tiv, ID->Id, LOB->Lob etc)
  4. Add RI staging tables (_staging_riinfo, _staging_riscope, _import_riinfo, _import_riscope) to SQL schema
  5. Fix load_sql.py: remove head(10) on location, uncomment usp_Database_Load call, fix RI table names
  6. Add StepPolicy table and load procedure for step-function fields at policy level

Out of scope: cyber fields, occupant demographics, full reinsurance normalised model (separate issue).

Related files: SQL/SQL_Scripts/DatabaseProjectOED.sql, SQL/load_sql.py, OpenExposureData/OEDInputFields.csv

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Waiting for Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions