kcigeospatial / Inlet-Field-and-Web-App-Configuration

Tracker for the Inlet Cleaning app
https://arcg.is/1imOaC
0 stars 1 forks source link

Inlets along MD-5 not syncing #45

Closed talllguy closed 5 years ago

talllguy commented 5 years ago

Several inlets along MD-5 south of DC are not having their ETL_PROGRAM_CATEGORY updated. @johnshiu can you check the status of it?

Here's an example on that should be cleaned/green

  Source Inlet Survey123
Structure No 1600474.01 1600474.01
Structure ID d5928981-b811-4e43-be65-47ed4d01b01c d5928981-b811-4e43-be65-47ed4d01b01c
Global ID {16AF9127-75D8-4CAF-89B6-676C2DDC2B1F} 16af9127-75d8-4caf-89b6-676c2ddc2b1f
Clean Status Cleaning Needed cleaned

Here's a few more:

image

johnshiu commented 5 years ago

@talllguy, I think that survey hasn't been synced yet. The creation date is:

CreationDate: 6/17/2019 12:40:26 PM
Creator: amanda.looper

I think that's UTC time, so 8:40 AM today, our time. It should be captured in the next overnight sync tonight.

talllguy commented 5 years ago

@johnshiu there are some others that are further down on US 301 that were inspected 6/12 but are still not showing. However, I see an issue with the related keys with these. Stakeholder first reported the issue on Thursday last week.

image

For these ones, the structure ID and number are both null or invalid! This must be a source data issue? Luckily I did include that Global ID in the matching so we can still match the inspections to inlets with no attributes. Can you make it so that the ETL script is based on the assumed referential match from {GLOBALID} to {REL_GLOBALID}? This is the only reference that we're guaranteed to have. The structure number or structure ID are only good when they're populated. If the ETL already uses the Global ID, then there is a problem. You can use 581b298a-b925-43f9-83bc-f4fb97454742 as an example where both the Survey123 REL_GLOBALID and the ICP GLOBALID are that value.

The underlying issue here is why these inlets have all null attributes. They could be newly entered? I'll investigate further.

talllguy commented 5 years ago

I took a look at this area on NPDES prod and all the inlets are there with attributes. Is it possible the using the Global ID may not be the best way to go since it may not be the same Global ID as the source inlet? I hadn't considered that possibility.

image

talllguy commented 5 years ago

Perhaps we need "Source Global ID"

johnshiu commented 5 years ago

For the ones with null structure IDs, we can use the REL_GLOBALID field to relate them with the new INLET_FOR_INSPECTION features that have no structure ID yet. I previously only related the pre-inspection results, not the cleaning inspection results, so this required a script update.

I have re-run the refresh with the updates, and they are now showing the correct cleaning symbology:

image

talllguy commented 5 years ago

@johnshiu to confirm, the REL_GLOBALID is now the FK for both an ICP†-initiated and field inlet-initiated inspections? These are the two possible inspections that can appear in the app. Is this first hierarchy accurate?

image

This would be the old hierarchy as I understand it: image

johnshiu commented 5 years ago

@talllguy, the old hierarchy is actually still the one being used. I only updated the association on the field inlets that do not have a valid STRUCTURE_ID because they are inserted separately into the ICP. The ones with the valid STRUCTURE_ID are associated with the NPDES.STRUCTURES feature class using the STRUCTURE_ID when inserted into the ICP.

talllguy commented 5 years ago

@johnshiu thanks! In this case, how did the inlets not have any of their production attributes (number, type, etc.) until you did the sync yesterday?