Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use run-state-machine resource to split out chunks of the AB premium …
…import
- Loading branch information
1 parent
8d383f6
commit 94dd180
Showing
5 changed files
with
332 additions
and
214 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
...sbase-premium-blueprint/state-machines/extract-addressbase-premium-properties-to-csv.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"Comment": "Extract Properties information from AddressBase Premium GML", | ||
"version": "1.0", | ||
"StartAt": "ExtractProperties", | ||
"categories": [ | ||
"gazetteer" | ||
], | ||
"instigators": [ | ||
"user" | ||
], | ||
"States": { | ||
"ExtractProperties": { | ||
"Type": "Task", | ||
"InputPath": "$.property", | ||
"Resource": "module:flattenXmlFiles", | ||
"ResourceConfig": { | ||
"rootXMLElement": "BasicLandPropertyUnit", | ||
"pivotPath": "$..LandPropertyIdentifier", | ||
"headerMap": [ | ||
["@.lpiKey", "lpi_key", "string"], | ||
["@.logicalStatus", "lpi_status", "number"], | ||
["$.uprn", "uprn", "number"], | ||
["$..udprn", "udprn", "number"], | ||
["$.changeType", "changeType", "string"], | ||
["$.blpuState", "state", "number"], | ||
["$.blpuStateDate", "state_date", "date"], | ||
["$..classificationCode", "class", "string"], | ||
["$.parentUPRN", "parent_uprn", "number"], | ||
[{"select": "$.position.Point.pos", "transform":"ordnanceSurvey_xCoord"}, "x", "number"], | ||
[{"select": "$.position.Point.pos", "transform":"ordnanceSurvey_yCoord"}, "y", "number"], | ||
[{"select": "$.positionLatLong.Point.pos", "transform":"ordnanceSurvey_xCoord"}, "longitude", "number"], | ||
[{"select": "$.positionLatLong.Point.pos", "transform":"ordnanceSurvey_yCoord"}, "latitude", "number"], | ||
["$.rpc", "rpc", "number"], | ||
["$.localCustodianCode", "local_custodian_code", "number"], | ||
["$.country", "country", "string"], | ||
["$.startDate", "la_start_date", "date"], | ||
["$.lastUpdateDate", "last_update_date", "date"], | ||
["$.entryDate", "entry_date", "date"], | ||
["$..DeliveryPointAddress.organisationName", "rm_organisation_name", "string"], | ||
["$..Organisation.organisation", "la_organisation", "string"], | ||
["$..DeliveryPointAddress.departmentName", "department_name", "string"], | ||
["$..Organisation.legalName", "legal_name", "string"], | ||
["$..DeliveryPointAddress.subBuildingName", "sub_building_name", "string"], | ||
["$..DeliveryPointAddress.buildingName", "building_name", "string"], | ||
["$..DeliveryPointAddress.buildingNumber", "building_number", "string"], | ||
["@.saoStartNumber", "sao_start_number", "string"], | ||
["@.saoStartSuffix", "sao_start_suffix", "string"], | ||
["@.saoEndNumber", "sao_end_number", "string"], | ||
["@.saoEndSuffix", "sao_end_suffix", "string"], | ||
["@.saoText", "sao_text", "string"], | ||
["$.todo", "alt_language_sao_text", "string"], | ||
["@.paoStartNumber", "pao_start_number", "string"], | ||
["@.paoStartSuffix", "pao_start_suffix", "string"], | ||
["@.paoEndNumber", "pao_end_number", "string"], | ||
["@.paoEndSuffix", "pao_end_suffix", "string"], | ||
["@.paoText", "pao_text", "string"], | ||
["$.todo", "alt_language_pao_text", "string"], | ||
["@.usrn", "usrn", "number"], | ||
["@.usrnMatchIndicator", "usrn_match_indicator", "number"], | ||
["@.areaName", "area_name", "string"], | ||
["@.level", "level", "string"], | ||
["@.officialFlag", "official_flag", "string"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MA')]..crossReference", "os_address_toid", "string", "comment - 7666MA = OS MasterMap Address Layer 2 TOID"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MA')]..version", "os_address_toid_version", "number"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MI')]..crossReference", "os_road_link_toid", "string", "comment - 7666MI = OS MasterMap Integrated Transport Network TOID."], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MI')]..version", "os_road_link_toid_version", "number"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MT')]..crossReference", "os_topo_toid", "string", "comment - 7666MT = OS MasterMap Topography Layer TOID."], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666MT')]..version", "os_topo_toid_version", "number"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666VC')]..crossReference", "voa_ct_record", "number", "comment - 7666VC = Centrally created Council Tax."], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666VN')]..crossReference", "voa_ndr_record", "number", "comment - 7666VN = Centrally created non-domestic rates."], | ||
["$..DeliveryPointAddress.dependentThoroughfare", "dependent_thoroughfare", "string"], | ||
["$..DeliveryPointAddress.thoroughfare", "thoroughfare", "string"], | ||
["$..DeliveryPointAddress.welshDependentThoroughfare", "welsh_dependent_thoroughfare", "string"], | ||
["$..DeliveryPointAddress.welshThoroughfare", "welsh_thoroughfare", "string"], | ||
["$..DeliveryPointAddress.doubleDependentLocality", "double_dependent_locality", "string"], | ||
["$..DeliveryPointAddress.dependentLocality", "dependent_locality", "string"], | ||
["$..DeliveryPointAddress.welshDoubleDependentLocality", "welsh_double_dependent_locality", "string"], | ||
["$..DeliveryPointAddress.welshDependentLocality", "welsh_dependent_locality", "string"], | ||
["$..DeliveryPointAddress.postTown", "post_town", "string"], | ||
["$..DeliveryPointAddress.welshPostTown", "welsh_post_town", "string"], | ||
["$..DeliveryPointAddress.postcode", "postcode", "string"], | ||
["$.postcodeLocator", "postcode_locator", "string"], | ||
["$..DeliveryPointAddress.postcodeType", "postcode_type", "string"], | ||
["$..DeliveryPointAddress.deliveryPointSuffix", "delivery_point_suffix", "string"], | ||
["$.addressbasePostal", "addressbase_postal", "string"], | ||
["$..DeliveryPointAddress.poBoxNumber", "po_box_number", "string"], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666OW')]..crossReference", "ward_code", "string", "comment - 7666OW = ONS Ward Code."], | ||
["$.applicationCrossReferenceMember[?(@.ApplicationCrossReference.source=='7666OP')]..crossReference", "parish_code", "string", "comment - 7666OP = ONS Parish Code."], | ||
["$..DeliveryPointAddress.entryDate", "rm_start_date", "date"], | ||
["$.multiOccCount", "multi_occ_count", "number"], | ||
["$.todo", "voa_ndrp_desc_code", "string"], | ||
["$.todo", "voa_ndr_scat_code", "string"], | ||
["$.todo", "alt_language", "string"] | ||
], | ||
"namespace": "strip" | ||
}, | ||
"End": true | ||
} | ||
}, | ||
"restrictions": [ | ||
{ | ||
"roleId": "$authenticated", | ||
"allows": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
...ressbase-premium-blueprint/state-machines/extract-addressbase-premium-streets-to-csv.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"Comment": "Extracts Streets information from AddressBase Premium GML", | ||
"version": "1.0", | ||
"StartAt": "ExtractStreets", | ||
"categories": [ | ||
"gazetteer" | ||
], | ||
"instigators": [ | ||
"user" | ||
], | ||
"States": { | ||
"ExtractStreets": { | ||
"Type": "Task", | ||
"InputPath": "$.streets", | ||
"Resource": "module:flattenXmlFiles", | ||
"ResourceConfig": { | ||
"rootXMLElement": "streetMember", | ||
"pivotPath": "$..StreetDescriptiveIdentifier", | ||
"headerMap": [ | ||
["$.Street.changeType", "changeType", "string"], | ||
["$.Street.usrn", "usrn", "number"], | ||
["@.streetDescription", "description", "string"], | ||
["@.townName", "townName", "string"], | ||
["@.administrativeArea", "administrativeArea","string"], | ||
["$.Street.streetSurface", "surface", "number"], | ||
["$.Street.streetClassification", "classification", "number"] | ||
], | ||
"namespace": "strip" | ||
}, | ||
"End": true | ||
} | ||
}, | ||
"restrictions": [ | ||
{ | ||
"roleId": "$authenticated", | ||
"allows": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.