Task: equi-join-detect (source dataset: Auto-BI)

Your are given a database with related tables used for business intelligence analysis. Your task is to identify all key/foreign-key join relationships between the tables for this database. Recall that a join is a relationship between two tables, that allows rows from one table to be combined with rows from another, based on a set of common join columns.
 
 
No explanation needed. Please return all join relationships in the following JSON format:
{
  "joins": [
    {
      "from_table": "table-1",
      "from_column": "column-1",
      "to_table": "table-2",
      "to_column": "column-3"
    }, 
	...
  ]
}

Tables:

Table: Alteration Types
|   Id | Label                     |   Order | Is_Active   |
|-----:|:--------------------------|--------:|:------------|
|    1 | Change of Planned Day     |       1 | True        |
|    3 | Change to Planned Times   |       2 | True        |
|    4 | Change to Impacted ICPs   |       3 | True        |
|    5 | Switch to Alternative Day |       4 | True        |
|    2 | Cancellation of Outage    |       5 | True        |


Table: Cancellation Reasons
|   Id | Label              |   Order | Is_Active   |
|-----:|:-------------------|--------:|:------------|
|    1 | Deferred           |       2 | True        |
|    2 | No Longer Required |       1 | True        |


Table: Date selection
| Name           |   Code |
|:---------------|-------:|
| Last 12 months |      1 |
| Last 3 months  |      2 |
| Last 2 months  |      3 |
| Last 30 days   |      4 |


Table: Date
| Date                    |   Year |   Quarter Of Year |   Month Of Year |   Day Of Month |   DateInt | Month Name   | Month In Calendar   | Quarter In Calendar   |   Day In Week | Day Of Week Name   | Week Ending             |   Week Number |   Month In Year |   QuarternYear |   Short Year | RY   |   Active Dates |   Month Year Sort | RY End Year             |   RY Month Number |   RY Month Year Sort |   RY Qtr | RY Qtr No   | RY Start Year           |   RY Week |   RY Week Year |   RY Year |   Week Rank | Week Starting           |
|:------------------------|-------:|------------------:|----------------:|---------------:|----------:|:-------------|:--------------------|:----------------------|--------------:|:-------------------|:------------------------|--------------:|----------------:|---------------:|-------------:|:-----|---------------:|------------------:|:------------------------|------------------:|---------------------:|---------:|:------------|:------------------------|----------:|---------------:|----------:|------------:|:------------------------|
| 2016-07-01 00:00:00.000 |   2016 |                 3 |               7 |              1 |  20160701 | July         | Jul 2016            | Q3 2016               |             5 | Friday             | 2016-07-02 00:00:00.000 |            27 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        14 |         201714 |      2017 |          27 | 2016-06-26 00:00:00.000 |
| 2016-07-02 00:00:00.000 |   2016 |                 3 |               7 |              2 |  20160702 | July         | Jul 2016            | Q3 2016               |             6 | Saturday           | 2016-07-02 00:00:00.000 |            27 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        14 |         201714 |      2017 |          27 | 2016-06-26 00:00:00.000 |
| 2016-07-03 00:00:00.000 |   2016 |                 3 |               7 |              3 |  20160703 | July         | Jul 2016            | Q3 2016               |             0 | Sunday             | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-04 00:00:00.000 |   2016 |                 3 |               7 |              4 |  20160704 | July         | Jul 2016            | Q3 2016               |             1 | Monday             | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-05 00:00:00.000 |   2016 |                 3 |               7 |              5 |  20160705 | July         | Jul 2016            | Q3 2016               |             2 | Tuesday            | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-06 00:00:00.000 |   2016 |                 3 |               7 |              6 |  20160706 | July         | Jul 2016            | Q3 2016               |             3 | Wednesday          | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-07 00:00:00.000 |   2016 |                 3 |               7 |              7 |  20160707 | July         | Jul 2016            | Q3 2016               |             4 | Thursday           | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-08 00:00:00.000 |   2016 |                 3 |               7 |              8 |  20160708 | July         | Jul 2016            | Q3 2016               |             5 | Friday             | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-09 00:00:00.000 |   2016 |                 3 |               7 |              9 |  20160709 | July         | Jul 2016            | Q3 2016               |             6 | Saturday           | 2016-07-09 00:00:00.000 |            28 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        15 |         201715 |      2017 |          28 | 2016-07-03 00:00:00.000 |
| 2016-07-10 00:00:00.000 |   2016 |                 3 |               7 |             10 |  20160710 | July         | Jul 2016            | Q3 2016               |             0 | Sunday             | 2016-07-16 00:00:00.000 |            29 |        20160700 |       20160300 |           16 | RY17 |              0 |            201607 | 2017-03-31 00:00:00.000 |                 4 |               201704 |        2 | 2017 Q2     | 2016-04-01 00:00:00.000 |        16 |         201716 |      2017 |          29 | 2016-07-10 00:00:00.000 |


Table: Distribution Transformers
|   Id |   ObjectID |   Enabled | DateCreated   | DateModified   | Owner   | Status     | FacilityID   | FeederID   |   OperatingVoltage | Mounting   |   SiteNumber | Network   |
|-----:|-----------:|----------:|:--------------|:---------------|:--------|:-----------|:-------------|:-----------|-------------------:|:-----------|-------------:|:----------|
|   56 |         77 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MM13         | OM656      |              11000 | CrossArm   |        71021 | Central   |
|  109 |        153 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MC22         | OM656      |              11000 | CrossArm   |        70968 | Central   |
|  110 |        154 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | AS10         | OM656      |              11000 | CrossArm   |        70398 | Central   |
|  113 |        159 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | PM7          | OM656      |              11000 | CrossArm   |        71164 | Central   |
|  160 |        230 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MM11         | OM656      |              11000 | CrossArm   |        71018 | Central   |
|  217 |        311 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MC20         | OM656      |              11000 | CrossArm   |        70966 | Central   |
|  265 |        382 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MM2          | OM656      |              11000 | CrossArm   |        71029 | Central   |
|  298 |        428 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MO35         | OM656      |              11000 | CrossArm   |        71081 | Central   |
|  341 |        484 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | PM18         | OM656      |              11000 | CrossArm   |        71133 | Central   |
|  375 |        532 |         1 | 1900-01-01    | 2020-04-02     | AUR     | In Service | MC23         | OM656      |              11000 | CrossArm   |        70969 | Central   |


Table: Fact Table
| Date                    | Time                    |   Half Hour Number |   EpochHH | Historical RAW SAIDI   | Historical RAW SAIFI   | RAW SAIDI   | RAW SAIFI   |   30 Mins SAIDI |   30 Mins SAIFI |   Last 24 hr Raw SAIDI |   Last 24 hr Raw SAIFI |   30 Mins Normalised SAIDI |   30 Mins Normalised SAIFI |   Max 24 hr Raw SAIDI |   Max 24 hr Raw SAIFI |
|:------------------------|:------------------------|-------------------:|----------:|:-----------------------|:-----------------------|:------------|:------------|----------------:|----------------:|-----------------------:|-----------------------:|---------------------------:|---------------------------:|----------------------:|----------------------:|
| 2016-04-11 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    110062 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-04-12 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    110110 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-04-13 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    110158 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-04-21 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    110542 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-05-14 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    111646 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-06-01 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    112510 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-06-02 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    112558 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-06-03 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    112606 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-06-16 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    113230 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |
| 2016-07-04 00:00:00.000 | 1899-12-30 23:00:00.000 |                 46 |    114094 |                        |                        |             |             |               0 |               0 |                      0 |                      0 |                          0 |                          0 |                     0 |                     0 |


Table: Historic Outage Cause
| CODE   | CAUSE_DESC                          |   OUTAGE_CAUSE_PK |
|:-------|:------------------------------------|------------------:|
| 0      | Unknown                             |                 2 |
| 0A     | Sub Transmission Failure (not used) |                38 |
| 0B     | Fault on Consumer Equip (not used)  |                39 |
| 1A     | Planned Outage - New Customer       |                 3 |
| 1B     | Planned Outage - TX Change          |                 4 |
| 1C     | Planned Outage - Tap Change         |                 5 |
| 1D     | Planned Outage - Maintenance        |                43 |
| 1E     | Planned - Pole Replacement          |                45 |
| 1F     | Planned - Line/Cable Upgrade        |                46 |
| 1G     | Planned - Vegetation Control        |                47 |


Table: Historic Outage Circuit
|   CODE | CIRCUIT_DESC   |   OUTAGE_CIRCUIT_PK |
|-------:|:---------------|--------------------:|
|      1 | Feeder 1       |                  34 |
|      2 | Feeder 2       |                  35 |
|      3 | Feeder 3       |                  36 |
|      4 | Feeder 4       |                  37 |
|      5 | Feeder 5       |                  38 |
|      6 | Feeder 6       |                  39 |
|      7 | Feeder 7       |                  40 |
|      8 | Feeder 8       |                  41 |
|      9 | Feeder 9       |                  42 |
|     10 | Feeder 10      |                  43 |


Table: Historic Outage Comments
| OUTAGE_COMMENTS                 |   OUTAGE_COMMENTS_PK |
|:--------------------------------|---------------------:|
| RMU MAINTENANCE                 |                   24 |
| LINE PATROLLED - NO CAUSE FOUND |                   44 |
| TRANSPOWER MAINTENANCE          |                   64 |
| SHEATH TESTS                    |                   84 |
| BLOWN LV FUSE                   |                  104 |
| LIKELY VEGETATION GROW-IN       |                  124 |
| LIKELY VEGETATION BLOW-IN       |                  125 |
| LIKELY VEGETATION FALL-IN       |                  126 |
| LIKELY BIRDS                    |                  127 |
| LIKELY POSSUMS                  |                  128 |


Table: Historic Outage Description
| OUTAGE_DESC               |   OUTAGE_DESC_PK |
|:--------------------------|-----------------:|
| EMERGENCY ISOLATION       |                1 |
| INCORRECT INSTALLATION    |                2 |
| ARM BRACE OFF             |                3 |
| TRANSPOWER                |                4 |
| AUTO CHANGEOVER OPERATION |                5 |
| BLOWN LV FUSE             |                6 |
| BRANCH / TREE ON LINE     |                7 |
| AUTO RECLOSE OPERATION    |                8 |
| BIRD STRIKE               |                9 |
| BLOWN HV FUSE             |               10 |


Table: Historic Outage Equip
|   CODE | EQUIP_DESC         |   OUTAGE_EQUIP_PK |
|-------:|:-------------------|------------------:|
|      0 | Equipment Unknown  |                40 |
|    101 | Conductor          |                 3 |
|    102 | Insulator - Strain |                 4 |
|    103 | Connector          |                 6 |
|    104 | Pole               |                 7 |
|    105 | Cross Arm          |                 8 |
|    106 | Lightning Arrestor |                 9 |
|    107 | Brace/Fixing       |                54 |
|    109 | HV Line Fuse - DDO |                10 |
|    110 | Airbreak Switch    |                12 |


Table: Historic Outage Nature
|   CODE | NATURE_DESC     |   OUTAGE_NATURE_PK |
|-------:|:----------------|-------------------:|
|      1 | Permanent       |                  2 |
|      2 | Transient       |                  3 |
|      3 | Non System      |                  4 |
|      4 | External        |                  5 |
|      5 | Auto-reclose    |                  6 |
|      6 | Auto-Changeover |                  1 |


Table: Historic Outage Phase
|   CODE | PHASE_DESC            |
|-------:|:----------------------|
|      0 | Planned Outage        |
|      1 | Earth Involved        |
|      2 | Phase to Phase        |
|      3 | Phases Unknown        |
|      4 | Emergency Isolation   |
|      5 | Accidential Isolation |
|      6 | Open Circuit          |
|      7 | Overload              |
|      8 | External              |


Table: Historic Outage Zone
|   CODE | ZONE_DESC               |   OUTAGE_ZONE_PK |
|-------:|:------------------------|-----------------:|
|      1 | Subtransmission         |                1 |
|      2 | Zone Substation         |                2 |
|      3 | High Voltage Feeder     |                3 |
|      4 | Distribution Substation |                4 |
|      5 | Low Voltage Feeder      |                5 |
|      6 | Generation              |                6 |
|      7 | Transpower              |                7 |
|      8 | Other                   |                8 |
|      9 | External                |                9 |


Table: Historic Outages and Interruptions
|   OUT_RECD_NO | INCIDENT_NO   | INCIDENT_TIME           |   ZONE |   FAULTED_PHASES |   SUBSTATION |   CIRCUIT_ID |   EQUIPMENT |   VOLTAGE | CAUSE   |   NATURE |   LOCATION | DESCRIPTION                          | COMMENTS   | OH_UG   |   TOTAL_OUT_TIME |   TOTAL_CONSUMERS | POLE_ID   | JOB_ID   |   RY | DIS   | REGS   |   SECTION_NO | INTERRUPTION_TIME       | RESTORE_TIME            |   NO_CONSUMERS |   LOAD_LOST |   OUTAGE_DURATION |   CONSUM_MINUTES |   ENERGY_LOST |   SUPPLY_LOSS_PK | DIS_REGS   | SITE_NO   | UNIT_NO   | FAULT_DUTY   | NO_FAULT_OPS   | PROT_PERFORM   | CB_PERFORM   | CB_PK   | Date                    | Time                    |   Raw SAIDI |   Raw SAIFI |   Half Hour Number |   EpochHH |   Total ICP |
|--------------:|:--------------|:------------------------|-------:|-----------------:|-------------:|-------------:|------------:|----------:|:--------|---------:|-----------:|:-------------------------------------|:-----------|:--------|-----------------:|------------------:|:----------|:---------|-----:|:------|:-------|-------------:|:------------------------|:------------------------|---------------:|------------:|------------------:|-----------------:|--------------:|-----------------:|:-----------|:----------|:----------|:-------------|:---------------|:---------------|:-------------|:--------|:------------------------|:------------------------|------------:|------------:|-------------------:|----------:|------------:|
|         18412 | C17/425       | 2017-07-10 14:20:00.000 |      3 |                4 |        70005 |         6511 |         105 |        11 | 0       |        3 |      71192 | EMERGENCY ISOLATION                  |            | O       |                4 |                82 |           |          | 2018 | D     | U      |            1 | 2017-07-10 14:20:00.000 | 2017-07-10 14:24:00.000 |             82 |          82 |                 4 |              328 |             5 |            25042 | DU         |           |           |              |                |                |              |         | 2017-07-10 00:00:00.000 | 1899-12-30 14:20:00.000 | 0.00370613  | 0.000926533 |                 28 |    131884 |       88502 |
|         21306 | 18/324        | 2018-06-04 18:29:00.000 |      3 |                4 |         1576 |            3 |         341 |        11 | 5E      |        3 |        582 | HV ISOLATION FOR LV FUSE REPLACEMENT |            | O       |                1 |               707 |           |          | 2019 | D     | U      |            1 | 2018-06-04 18:29:00.000 | 2018-06-04 18:30:00.000 |            707 |         707 |                 1 |              707 |            12 |            28839 | DU         |           |           |              |                |                |              |         | 2018-06-04 00:00:00.000 | 1899-12-30 18:29:00.000 | 0.00787226  | 0.00787226  |                 36 |    147684 |       89809 |
|         17946 | C17/231       | 2017-04-18 19:25:00.000 |      3 |                3 |        83464 |         6576 |           0 |        11 | 0       |        2 |         10 | SUCCESSFUL RECLOSE                   |            | O       |               17 |               192 |           |          | 2018 | D     | U      |            1 | 2017-04-18 19:25:00.000 | 2017-04-18 19:42:00.000 |            192 |         192 |                17 |             3264 |            54 |            24398 | DU         |           |           |              |                |                |              |         | 2017-04-18 00:00:00.000 | 1899-12-30 19:25:00.000 | 0.0368805   | 0.00216944  |                 38 |    127910 |       88502 |
|         17297 | C16/493       | 2016-10-12 00:21:00.000 |      3 |                3 |        70014 |         7652 |         101 |        11 | 6D      |        1 |      72359 | LINE DOWN                            |            | O       |              690 |                23 |           |          | 2017 | D     | U      |            1 | 2016-10-12 00:21:00.000 | 2016-10-12 11:51:00.000 |             23 |          23 |               690 |            15870 |           265 |            23499 | DU         |           |           |              |                |                |              |         | 2016-10-12 00:00:00.000 | 1899-12-30 00:21:00.000 | 0.182292    | 0.000264192 |                  0 |    118848 |       87058 |
|         16985 | 16/102        | 2016-06-09 00:23:00.000 |      3 |                3 |         1747 |            5 |         302 |        11 | 5A      |        2 |       2371 | BLOWN HV FUSE                        |            | O       |               62 |                50 |           |          | 2017 | D     | U      |            1 | 2016-06-09 00:23:00.000 | 2016-06-09 00:28:00.000 |             31 |          31 |                 5 |              155 |             3 |            23065 | DU         |           |           |              |                |                |              |         | 2016-06-09 00:00:00.000 | 1899-12-30 00:23:00.000 | 0.00178042  | 0.000356084 |                  0 |    112848 |       87058 |
|         17331 | C16/516       | 2016-10-18 13:29:00.000 |      3 |                4 |        83661 |         2006 |         101 |        11 | 6C      |        3 |      71755 | BROKEN TIE WIRE (FLOATER)            |            | O       |               46 |               202 |           |          | 2017 | D     | U      |            1 | 2016-10-18 13:29:00.000 | 2016-10-18 14:15:00.000 |             92 |          92 |                46 |             4232 |            71 |            23550 | DU         |           |           |              |                |                |              |         | 2016-10-18 00:00:00.000 | 1899-12-30 13:29:00.000 | 0.0486113   | 0.00105677  |                 26 |    119162 |       87058 |
|         18018 | C17/272       | 2017-05-02 14:05:00.000 |      3 |                4 |        70004 |          168 |         331 |        11 | 5C      |        3 |      70084 | EMERGENCY ISOLATION                  |            | O       |                3 |               952 |           |          | 2018 | D     | U      |            1 | 2017-05-02 14:05:00.000 | 2017-05-02 14:08:00.000 |            952 |         952 |                 3 |             2856 |            48 |            24516 | DU         |           |           |              |                |                |              |         | 2017-05-02 00:00:00.000 | 1899-12-30 14:05:00.000 | 0.0322705   | 0.0107568   |                 28 |    128572 |       88502 |
|         20418 | C18/063       | 2018-01-31 00:54:00.000 |      3 |                4 |        70014 |          765 |         106 |        11 | 0       |        1 |      72276 | FAULTY LIGHTNING ARRESTOR            |            | O       |               30 |               209 |           |          | 2018 | D     | U      |            1 | 2018-01-31 00:54:00.000 | 2018-01-31 01:24:00.000 |            209 |          30 |                30 |             6270 |            15 |            27684 | DU         |           |           |              |                |                |              |         | 2018-01-31 00:00:00.000 | 1899-12-30 00:54:00.000 | 0.0708459   | 0.00236153  |                  1 |    141697 |       88502 |
|         20955 | C18/262       | 2018-04-20 00:55:00.000 |      3 |                4 |        70018 |         7375 |         101 |        11 | 9C      |        3 |      72418 | HIGH LOAD                            |            | O       |                8 |               552 |           |          | 2019 | D     | U      |            1 | 2018-04-20 00:55:00.000 | 2018-04-20 01:03:00.000 |            552 |         552 |                 8 |             4416 |            74 |            28398 | DU         |           |           |              |                |                |              |         | 2018-04-20 00:00:00.000 | 1899-12-30 00:55:00.000 | 0.049171    | 0.00614638  |                  1 |    145489 |       89809 |
|         21336 | C18/368       | 2018-06-11 16:45:00.000 |      3 |                4 |        70004 |          151 |         101 |        11 | 6B      |        3 |      70258 | BROKEN TIE WIRE (FLOATER)            |            | O       |                7 |                 6 |           |          | 2019 | D     | U      |            1 | 2018-06-11 16:45:00.000 | 2018-06-11 16:52:00.000 |              6 |           6 |                 7 |               42 |             1 |            28868 | DU         |           |           |              |                |                |              |         | 2018-06-11 00:00:00.000 | 1899-12-30 16:45:00.000 | 0.000467659 | 6.68084e-05 |                 33 |    148017 |       89809 |


Table: Historical ICP
|   Year |   ICP |
|-------:|------:|
|   2008 | 79076 |
|   2009 | 80249 |
|   2010 | 80249 |
|   2011 | 81971 |
|   2012 | 82368 |
|   2013 | 83282 |
|   2014 | 83994 |
|   2015 | 84931 |
|   2016 | 85953 |
|   2017 | 87058 |


Table: ICP
|   Year |   ICP |
|-------:|------:|
|   2008 | 79076 |
|   2009 | 80249 |
|   2010 | 80249 |
|   2011 | 81971 |
|   2012 | 82368 |
|   2013 | 83282 |
|   2014 | 83994 |
|   2015 | 84931 |
|   2016 | 85953 |
|   2017 | 87058 |


Table: Interruption Types
|   Id | Description   | Label     |   Order | Is_Active   |
|-----:|:--------------|:----------|--------:|:------------|
|    1 | Unplanned     | Unplanned |       2 | True        |
|    2 | Notified      | Notified  |       3 | True        |
|    3 | Planned       | Planned   |       1 | True        |


Table: Measure Selection
| Name                |   Code |
|:--------------------|-------:|
| No of Interruptions |      1 |
| SAIDI               |      2 |
| SAIFI               |      3 |


Table: N
|   N |
|----:|
|   1 |
|   2 |
|   3 |
|   4 |
|   5 |
|   6 |
|   7 |
|   8 |
|   9 |
|  10 |


Table: OH or UG
|   Id | Label       |   Order | Is_Active   |
|-----:|:------------|--------:|:------------|
|    1 | Overhead    |       1 | True        |
|    2 | Underground |       2 | True        |


Table: Outage Cause
|   Id | Code   | CauseDescription                       |
|-----:|:-------|:---------------------------------------|
|    1 | 3D     | Vegetation - Windblown Debris          |
|    2 | 1B     | Planned Outage - TX Change             |
|    3 | 1J     | Planned – OH/UG Conversion             |
|    4 | 0B     | Fault on Consumer Equip (not used)     |
|    5 | 9F     | Foreign Interference Objects           |
|    6 | 5D     | Equipment Faulty Manufacture           |
|    7 | 5E     | Equipment Outside Operating Parameters |
|    8 | 7I     | Environment Slip                       |
|    9 | 7A     | Environment Salt Spray                 |
|   10 | 1D     | Planned Outage - Maintenance           |


Table: Outage Circuit
|   Id |   CODE | CIRCUIT_DESC            |
|-----:|-------:|:------------------------|
|   78 |      1 | Feeder 1                |
|   79 |    192 | Fraser - Clyde Dam      |
|   80 |   5308 | Broadview Rise-Watts Rd |
|   81 |     69 | E696 Neville St T1      |
|   82 |   2433 | Ardgour                 |
|   83 |    830 | T1                      |
|   84 |     31 | E312 Berwick 33kV (OLD) |
|   85 |   7596 | RECLOSER 7596           |
|   86 |     51 | E751 N.E.V. T2          |
|   87 |   1102 | Upper Clutha No 2 Line  |


Table: Outage Descriptions
|   Id | Description                            |   OUTAGE_DESC_PK |
|-----:|:---------------------------------------|-----------------:|
|    1 | ACCELERATED POLE REPLACEMENT PROGRAMME |              102 |
|    2 | EMERGENCY ISOLATION                    |                1 |
|    3 | INCORRECT INSTALLATION                 |                2 |
|    4 | HV ISOLATION FOR LV FUSE REPLACEMENT   |               82 |
|    5 | ARM BRACE OFF                          |                3 |
|    6 | TRANSPOWER                             |                4 |
|    7 | 33/66kV TO 11/6.6kV LINE CLASH         |               62 |
|    8 | POLE REPLACEMENT - UNPLANNED           |              122 |
|    9 | COMMUNICATIONS EQUIP - ERROR/FAILURE   |              165 |
|   10 | INCORRECT RECORDS                      |              222 |


Table: Outage Equipment
|   Id |   Code | EquipmentDescription            |
|-----:|-------:|:--------------------------------|
|    1 |    226 | Cable Joint                     |
|    2 |    555 | Ripple Absorption Unit          |
|    3 |    229 | Cable - XLPE                    |
|    4 |    223 | 33kV Cable (Solid)              |
|    5 |    119 | HV Line Fuse - HRC              |
|    6 |    602 | Not Applicable / Planned Outage |
|    7 |    103 | Connector                       |
|    8 |    304 | GM Switchgear (Sub)             |
|    9 |    109 | HV Line Fuse - DDO              |
|   10 |    115 | Auto Recloser                   |


Table: Outage Nature
|   Id | Label           |   Order | Is_Active   |
|-----:|:----------------|--------:|:------------|
|    1 | Transient       |       2 | True        |
|    2 | Auto Changeover |       6 | True        |
|    3 | Auto-Reclose    |       5 | True        |
|    4 | External        |       4 | True        |
|    5 | Permanent       |       1 | True        |
|    6 | Non System      |       3 | True        |


Table: Outage Phase
|   Id |   CODE | PHASE_DESC           |
|-----:|-------:|:---------------------|
|    1 |      4 | Emergency Isolation  |
|    2 |      3 | Phases Unknown       |
|    3 |      1 | Earth Involved       |
|    4 |      7 | Overload             |
|    5 |      8 | External             |
|    6 |      2 | Phase to Phase       |
|    7 |      0 | Planned Outage       |
|    8 |      6 | Open Circuit         |
|    9 |      5 | Accidental Isolation |


Table: Outage Status
|   Id | Label     |   Order | Is_Active   |
|-----:|:----------|--------:|:------------|
|    1 | Completed |       2 | True        |
|    2 | Cancelled |       3 | True        |
|    3 | Pending   |       1 | True        |


Table: Outages And Interruptions
|   Id | IncidentTime            |   Zone |   FaultedPhases | ZoneSubstation   |   CircuitID |   Equipment | Voltage   |   Cause |   Nature | Location   | Description   | Comments                                     |   TotalOutageTime |   TotalConsumers | PoleID   | JobID     | OverheadOrUnderGround   |   SubNetwork |   OHorUG |   Volts | CancelledDateTime       | CancellationNotified    |   Status |   CancellationReason | CustomerRequested   |   CommonDescription |   DistributionTransformer | ActualInterruptionTime   | ActualRestoreTime       |   NumberOfConsumers |   LoadLost |   InterruptionDuration |   TotalConsumerMinutes |   EnergyLost | TotalInterruptionTime   |   InterruptionType | PlannedInterruptionType   | AlternativeDay          | RetailConsumerRetailerNotify   | RetailConsumerDirectNotify   | DirectBilledConsumerNotify   | WebsitePublishing       |   ReasonForPlannedOutage |   TypeOfInterruptionAltDay |   AltDayReasonForChange |   Section ID |   OutageID | NotifiedInterruptionDateTime   | NotifiedRestorationDateTime   | Cancelled   | CancelledDate           |   SectionCancellationReason |   RY | DIS   | REGS   | DIS_REGS   | CalculatedOutageType   | Actual Interruption Start Time (NZST)   | Actual Interruption Restore Time (NZST)   | Time                    | Date                    |   Reportable? |   Half Hour Number |   EpochHH |   Raw SAIDI |   Raw SAIFI |   Total ICP |
|-----:|:------------------------|-------:|----------------:|:-----------------|------------:|------------:|:----------|--------:|---------:|:-----------|:--------------|:---------------------------------------------|------------------:|-----------------:|:---------|:----------|:------------------------|-------------:|---------:|--------:|:------------------------|:------------------------|---------:|---------------------:|:--------------------|--------------------:|--------------------------:|:-------------------------|:------------------------|--------------------:|-----------:|-----------------------:|-----------------------:|-------------:|:------------------------|-------------------:|:--------------------------|:------------------------|:-------------------------------|:-----------------------------|:-----------------------------|:------------------------|-------------------------:|---------------------------:|------------------------:|-------------:|-----------:|:-------------------------------|:------------------------------|:------------|:------------------------|----------------------------:|-----:|:------|:-------|:-----------|:-----------------------|:----------------------------------------|:------------------------------------------|:------------------------|:------------------------|--------------:|-------------------:|----------:|------------:|------------:|------------:|
| 1292 | 2021-01-17 18:03:00.000 |      3 |               3 | Arrowtown        |         177 |          12 |           |      43 |        5 |            |               | Branch over conductor at PP35838             |               378 |                0 |          | F-3961-E  |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  13 |                      3570 | 2021-01-17 18:03:00.000  | 2021-01-17 19:24:00.000 |                 224 |        224 |                     81 |                  18144 |          302 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2187 |       1292 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2021-01-18 07:03:00.000                 | 2021-01-18 08:24:00.000                   | 1899-12-30 07:03:00.000 | 2021-01-18 00:00:00.000 |             1 |                 14 |    193694 |  0.196958   | 0.00243158  |       92121 |
| 1292 | 2021-01-17 18:03:00.000 |      3 |               3 | Arrowtown        |         177 |          12 |           |      43 |        5 |            |               | Branch over conductor at PP35838             |               378 |                0 |          | F-3961-E  |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  13 |                      3570 | 2021-01-17 18:03:00.000  | 2021-01-17 20:02:00.000 |                  74 |         74 |                    119 |                   8806 |          147 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2188 |       1292 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2021-01-18 07:03:00.000                 | 2021-01-18 09:02:00.000                   | 1899-12-30 07:03:00.000 | 2021-01-18 00:00:00.000 |             1 |                 14 |    193694 |  0.0955917  | 0.000803291 |       92121 |
| 1292 | 2021-01-17 18:03:00.000 |      3 |               3 | Arrowtown        |         177 |          12 |           |      43 |        5 |            |               | Branch over conductor at PP35838             |               378 |                0 |          | F-3961-E  |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  13 |                      3570 | 2021-01-17 18:03:00.000  | 2021-01-17 20:47:00.000 |                  59 |         59 |                    164 |                   9676 |          161 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2189 |       1292 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2021-01-18 07:03:00.000                 | 2021-01-18 09:47:00.000                   | 1899-12-30 07:03:00.000 | 2021-01-18 00:00:00.000 |             1 |                 14 |    193694 |  0.105036   | 0.000640462 |       92121 |
| 1292 | 2021-01-17 18:03:00.000 |      3 |               3 | Arrowtown        |         177 |          12 |           |      43 |        5 |            |               | Branch over conductor at PP35838             |               378 |                0 |          | F-3961-E  |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  13 |                      3570 | 2021-01-17 18:03:00.000  | 2021-01-17 23:26:00.000 |                   7 |          7 |                    323 |                   2261 |           38 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2190 |       1292 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2021-01-18 07:03:00.000                 | 2021-01-18 12:26:00.000                   | 1899-12-30 07:03:00.000 | 2021-01-18 00:00:00.000 |             1 |                 14 |    193694 |  0.0245438  | 7.5987e-05  |       92121 |
| 1150 | 2020-12-06 08:43:00.000 |      3 |               3 | Camp Hill        |         181 |          38 |           |      52 |        5 |            |               |                                              |               207 |                0 |          | F-3889-E  |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  48 |                      1070 | 2020-12-06 11:07:00.000  | 2020-12-06 11:24:00.000 |                  14 |         14 |                     17 |                    238 |            4 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2087 |       1150 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2020-12-07 00:07:00.000                 | 2020-12-07 00:24:00.000                   | 1899-12-30 00:07:00.000 | 2020-12-07 00:00:00.000 |             1 |                  0 |    191664 |  0.00258356 | 0.000151974 |       92121 |
| 1019 | 2020-11-10 10:00:00.000 |      3 |               3 | East Taieri      |          89 |          45 |           |      40 |        1 |            |               |                                              |               293 |                0 |          | F-3766-E  |                         |            1 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  40 |                      4487 | 2020-11-10 11:09:00.000  | 2020-11-10 11:12:00.000 |                 317 |        317 |                      3 |                    951 |           16 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         1654 |       1019 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2020-11-11 00:09:00.000                 | 2020-11-11 00:12:00.000                   | 1899-12-30 00:09:00.000 | 2020-11-11 00:00:00.000 |             1 |                  0 |    190416 |  0.0103234  | 0.00344113  |       92121 |
| 1229 | 2020-12-15 21:59:00.000 |      3 |               1 | Andersons Bay    |         166 |          33 |           |      23 |        5 |            |               | Contractor found broken pole unsure of cause |               180 |              102 | PP69273  | F-283-H   |                         |            1 |        1 |       3 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                   8 |                      3779 | 2020-12-15 21:59:00.000  | 2020-12-16 00:59:00.000 |                 102 |        102 |                    180 |                  18360 |          306 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         2057 |       1229 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2020-12-16 10:59:00.000                 | 2020-12-16 13:59:00.000                   | 1899-12-30 10:59:00.000 | 2020-12-16 00:00:00.000 |             1 |                 21 |    192117 |  0.199303   | 0.00110724  |       92121 |
|  874 | 2020-10-05 21:53:00.000 |      3 |               1 | Arrowtown        |          85 |          51 |           |      23 |        6 |            |               |                                              |                 0 |                0 |          | J-13969-F |                         |            2 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  18 |                      6923 | 2020-10-05 21:52:00.000  | 2020-10-05 23:12:00.000 |                  18 |         18 |                     80 |                   1440 |           24 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         1280 |        874 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2020-10-06 10:52:00.000                 | 2020-10-06 12:12:00.000                   | 1899-12-30 10:52:00.000 | 2020-10-06 00:00:00.000 |             1 |                 21 |    188709 |  0.0156316  | 0.000195395 |       92121 |
| 1019 | 2020-11-10 10:00:00.000 |      3 |               3 | East Taieri      |          89 |          45 |           |      40 |        1 |            |               |                                              |               293 |                0 |          | F-3766-E  |                         |            1 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  40 |                      4487 | 2020-11-10 11:22:00.000  | 2020-11-10 11:23:00.000 |                 525 |        525 |                      1 |                    525 |            9 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         1656 |       1019 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2021 | D     | U      | DU         | Unplanned              | 2020-11-11 00:22:00.000                 | 2020-11-11 00:23:00.000                   | 1899-12-30 00:22:00.000 | 2020-11-11 00:00:00.000 |             1 |                  0 |    190416 |  0.00569903 | 0.00569903  |       92121 |
| 1763 | 2021-05-08 08:46:00.000 |      3 |               3 | Port Chalmers    |          89 |          12 |           |      23 |        5 |            |               |                                              |               388 |                0 | 60973    | F-4180-E  |                         |            1 |        1 |       5 | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000 |        1 |                    1 | False               |                  39 |                      1280 | 2021-05-08 12:28:00.000  | 2021-05-08 12:31:00.000 |                 113 |        113 |                      3 |                    339 |            6 | 00:00:00                |                  1 |                           | 1900-01-01 00:00:00.000 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000      | 1900-01-01 00:00:00.000 |                        1 |                          0 |                       0 |         3142 |       1763 | 1900-01-01 00:00:00.000        | 1900-01-01 00:00:00.000       | False       | 1900-01-01 00:00:00.000 |                           0 | 2022 | D     | U      | DU         | Unplanned              | 2021-05-09 00:28:00.000                 | 2021-05-09 00:31:00.000                   | 1899-12-30 00:28:00.000 | 2021-05-09 00:00:00.000 |             1 |                  0 |    199008 |  0.00365873 | 0.00121958  |       92655 |


Table: Planned Outage Reason
|   Id | Label              |   Order | Is_Active   |
|-----:|:-------------------|--------:|:------------|
|    1 | New Connections    |       1 | True        |
|    2 | Tap Change         |       3 | True        |
|    3 | Line/Cable Upgrade |       6 | True        |
|    4 | Transformer Change |       2 | True        |
|    5 | Vegetation Control |       7 | True        |
|    6 | Maintenance        |       4 | True        |
|    7 | Pole Replacement   |       5 | True        |


Table: Section Cancellation Reasons
|   Id | Label             |   Order | Is_Active   |
|-----:|:------------------|--------:|:------------|
|    1 | Other             |       5 | True        |
|    2 | Major Event Day   |       4 | True        |
|    3 | Crew Availability |       3 | True        |
|    4 | Equipment         |       2 | True        |
|    5 | Weather           |       1 | True        |


Table: Subnetwork
|   Id | Label   |   Order | Is_Active   |
|-----:|:--------|--------:|:------------|
|    1 | Dunedin |       1 | True        |
|    2 | Central |       2 | True        |


Table: Test
| RY   |   RY Month Number |   Average Norm SAIDI |
|:-----|------------------:|---------------------:|
| RY18 |                 1 |              8.22253 |
| RY18 |                 2 |              6.08926 |
| RY18 |                 3 |              8.70983 |
| RY18 |                 4 |              8.18669 |
| RY18 |                 5 |              4.67178 |
| RY18 |                 6 |             10.5308  |
| RY18 |                 7 |              5.15846 |
| RY18 |                 8 |             11.2606  |
| RY18 |                 9 |             13.1845  |
| RY18 |                10 |             10.5012  |


Table: Time
| Time                    | Hour                    | Half Hour               | Quarter Hour            |   Minute |   Hour Number |   Half Hour Number | Next Hour   | Next Quarter Hour   | Period of Day   |   PeriodSort |   TimeKey |
|:------------------------|:------------------------|:------------------------|:------------------------|---------:|--------------:|-------------------:|:------------|:--------------------|:----------------|-------------:|----------:|
| 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        0 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         0 |
| 1899-12-30 00:01:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        1 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         1 |
| 1899-12-30 00:02:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        2 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         2 |
| 1899-12-30 00:03:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        3 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         3 |
| 1899-12-30 00:04:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        4 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         4 |
| 1899-12-30 00:05:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        5 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         5 |
| 1899-12-30 00:06:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        6 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         6 |
| 1899-12-30 00:07:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        7 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         7 |
| 1899-12-30 00:08:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        8 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         8 |
| 1899-12-30 00:09:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 | 1899-12-30 00:00:00.000 |        9 |             0 |                  0 | 1:00:00 AM  | 12:15:00 AM         | After Midnight  |            0 |         9 |


Table: Trigger Value
|   Trigger Value |
|----------------:|
|               1 |
|               2 |
|               3 |
|               4 |
|               5 |
|               6 |
|               7 |
|               8 |
|               9 |
|              10 |


Table: Voltages
|   Id |   Label |   Order | Is_Active   |
|-----:|--------:|--------:|:------------|
|    1 |    33   |       1 | True        |
|    2 |    66   |       2 | True        |
|    3 |     6.6 |       4 | True        |
|    4 |     0.4 |       8 | True        |
|    5 |    11   |       3 | True        |


Table: Zone Substations
|   Id | Substation        | SubstationCode   |   Site |   Network |
|-----:|:------------------|:-----------------|-------:|----------:|
|    1 | Arrowtown         | AT               |  70014 |         2 |
|    2 | East Taieri       | ET               |    589 |         1 |
|    3 | Roxburgh          | RB               |  70002 |         2 |
|    4 | St Kilda          | SK               |   2098 |         1 |
|    5 | Earnscleugh       | EC               |  70006 |         2 |
|    6 | Smith St          | SS               |   2052 |         1 |
|    7 | Cromwell          | CM               |  70008 |         2 |
|    8 | North East Valley | NV               |   3476 |         1 |
|    9 | Halfway Bush GXP  | HWB              |   1699 |         1 |
|   10 | Ettrick           | EK               |  70001 |         2 |


Table: Zones
|   Id |   Code | ZoneDescription         |
|-----:|-------:|:------------------------|
|    1 |      4 | Distribution Substation |
|    2 |      9 | External                |
|    6 |      6 | Generation              |
|    3 |      3 | High Voltage Feeder     |
|    8 |      5 | Low Voltage Feeder      |
|    5 |      8 | Other                   |
|    9 |      1 | Subtransmission         |
|    4 |      7 | Transpower              |
|    7 |      2 | Zone Substation         |

 


tables: name: Alteration Types
data: Alteration Types.csv
name: Cancellation Reasons
data: Cancellation Reasons.csv
name: Date selection
data: Date selection.csv
name: Date
data: Date.csv
name: Distribution Transformers
data: Distribution Transformers.csv
name: Fact Table
data: Fact Table.csv
name: Historic Outage Cause
data: Historic Outage Cause.csv
name: Historic Outage Circuit
data: Historic Outage Circuit.csv
name: Historic Outage Comments
data: Historic Outage Comments.csv
name: Historic Outage Description
data: Historic Outage Description.csv
name: Historic Outage Equip
data: Historic Outage Equip.csv
name: Historic Outage Nature
data: Historic Outage Nature.csv
name: Historic Outage Phase
data: Historic Outage Phase.csv
name: Historic Outage Zone
data: Historic Outage Zone.csv
name: Historic Outages and Interruptions
data: Historic Outages and Interruptions.csv
name: Historical ICP
data: Historical ICP.csv
name: ICP
data: ICP.csv
name: Interruption Types
data: Interruption Types.csv
name: Measure Selection
data: Measure Selection.csv
name: N
data: N.csv
name: OH or UG
data: OH or UG.csv
name: Outage Cause
data: Outage Cause.csv
name: Outage Circuit
data: Outage Circuit.csv
name: Outage Descriptions
data: Outage Descriptions.csv
name: Outage Equipment
data: Outage Equipment.csv
name: Outage Nature
data: Outage Nature.csv
name: Outage Phase
data: Outage Phase.csv
name: Outage Status
data: Outage Status.csv
name: Outages And Interruptions
data: Outages And Interruptions.csv
name: Planned Outage Reason
data: Planned Outage Reason.csv
name: Section Cancellation Reasons
data: Section Cancellation Reasons.csv
name: Subnetwork
data: Subnetwork.csv
name: Test
data: Test.csv
name: Time
data: Time.csv
name: Trigger Value
data: Trigger Value.csv
name: Voltages
data: Voltages.csv
name: Zone Substations
data: Zone Substations.csv
name: Zones
data: Zones.csv
label: Outages And Interruptions
InterruptionType
Interruption Types
Id
Outages And Interruptions
OHorUG
OH or UG
Id
Outages And Interruptions
Status
Outage Status
Id
Outages And Interruptions
Status
Subnetwork
Id
Outages And Interruptions
Voltage
Voltages
Id
Outages And Interruptions
ZoneSubstation
Zone Substations
Substation
Outages And Interruptions
PlannedInterruptionType
Alteration Types
Id
Outages And Interruptions
FaultedPhases
Outage Phase
Id
Outages And Interruptions
ReasonForPlannedOutage
Planned Outage Reason
Id
Outages And Interruptions
Zone
Zones
Id
Outages And Interruptions
Cause
Outage Cause
Id
Outages And Interruptions
Nature
Outage Nature
Id
Outages And Interruptions
Equipment
Outage Equipment
Id
Outages And Interruptions
Description
Outage Descriptions
Id
Outages And Interruptions
CircuitID
Outage Circuit
Id
Outages And Interruptions
CancellationReason
Cancellation Reasons
Id
Outages And Interruptions
DistributionTransformer
Distribution Transformers
Id
Outages And Interruptions
SectionCancellationReason
Section Cancellation Reasons
Id
Outages And Interruptions
Time
Time
Time
Fact Table
Date
Date
Date
Historic Outages and Interruptions
RY
Historical ICP
Year
Historic Outages and Interruptions
CAUSE
Historic Outage Cause
CAUSE_DESC
Historic Outages and Interruptions
FAULTED_PHASES
Historic Outage Phase
CODE
Historic Outages and Interruptions
EQUIPMENT
Historic Outage Equip
CODE
Historic Outages and Interruptions
DESCRIPTION
Historic Outage Description
OUTAGE_DESC
Historic Outages and Interruptions
COMMENTS
Historic Outage Comments
OUTAGE_COMMENTS
Historic Outages and Interruptions
ZONE
Historic Outage Zone
CODE
Historic Outages and Interruptions
CIRCUIT_ID
Historic Outage Circuit
CODE
Historic Outages and Interruptions
NATURE
Historic Outage Nature
CODE
Historic Outages and Interruptions
Time
Time
Time
Outages And Interruptions
EpochHH
Fact Table
EpochHH
Historic Outages and Interruptions
EpochHH
Fact Table
EpochHH
Date selection
Code
Historic Outage Circuit
CODE
Measure Selection
Code
Historic Outage Circuit
CODE
output: {
    "joins": [
        {
            "from_table": "Outages And Interruptions",
            "from_column": "InterruptionType",
            "to_table": "Interruption Types",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "OHorUG",
            "to_table": "OH or UG",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Status",
            "to_table": "Outage Status",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Status",
            "to_table": "Subnetwork",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Voltage",
            "to_table": "Voltages",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "ZoneSubstation",
            "to_table": "Zone Substations",
            "to_column": "Substation"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "PlannedInterruptionType",
            "to_table": "Alteration Types",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "FaultedPhases",
            "to_table": "Outage Phase",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "ReasonForPlannedOutage",
            "to_table": "Planned Outage Reason",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Zone",
            "to_table": "Zones",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Cause",
            "to_table": "Outage Cause",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Nature",
            "to_table": "Outage Nature",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Equipment",
            "to_table": "Outage Equipment",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Description",
            "to_table": "Outage Descriptions",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "CircuitID",
            "to_table": "Outage Circuit",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "CancellationReason",
            "to_table": "Cancellation Reasons",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "DistributionTransformer",
            "to_table": "Distribution Transformers",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "SectionCancellationReason",
            "to_table": "Section Cancellation Reasons",
            "to_column": "Id"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "Time",
            "to_table": "Time",
            "to_column": "Time"
        },
        {
            "from_table": "Fact Table",
            "from_column": "Date",
            "to_table": "Date",
            "to_column": "Date"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "RY",
            "to_table": "Historical ICP",
            "to_column": "Year"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "CAUSE",
            "to_table": "Historic Outage Cause",
            "to_column": "CAUSE_DESC"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "FAULTED_PHASES",
            "to_table": "Historic Outage Phase",
            "to_column": "CODE"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "EQUIPMENT",
            "to_table": "Historic Outage Equip",
            "to_column": "CODE"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "DESCRIPTION",
            "to_table": "Historic Outage Description",
            "to_column": "OUTAGE_DESC"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "COMMENTS",
            "to_table": "Historic Outage Comments",
            "to_column": "OUTAGE_COMMENTS"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "ZONE",
            "to_table": "Historic Outage Zone",
            "to_column": "CODE"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "CIRCUIT_ID",
            "to_table": "Historic Outage Circuit",
            "to_column": "CODE"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "NATURE",
            "to_table": "Historic Outage Nature",
            "to_column": "CODE"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "Time",
            "to_table": "Time",
            "to_column": "Time"
        },
        {
            "from_table": "Outages And Interruptions",
            "from_column": "EpochHH",
            "to_table": "Fact Table",
            "to_column": "EpochHH"
        },
        {
            "from_table": "Historic Outages and Interruptions",
            "from_column": "EpochHH",
            "to_table": "Fact Table",
            "to_column": "EpochHH"
        },
        {
            "from_table": "Date selection",
            "from_column": "Code",
            "to_table": "Historic Outage Circuit",
            "to_column": "CODE"
        },
        {
            "from_table": "Measure Selection",
            "from_column": "Code",
            "to_table": "Historic Outage Circuit",
            "to_column": "CODE"
        }
    ]
}