3.5 KiB
Add field assessment entries
Field inspections carried out on sections of pipelines.
Field inspections are conducted for various reasons the two most likely are for repairs and for validation of an ILI report.
Generally for a field inspection a approximately 15 meter long pit will be dug to expose a complete pipeline joint along with a couple of meters of the proceeding and subsequence joints. Multiple inspections will be carried out on the exposed joint.
Input
Arguments
-
org_id: as string which should be a validuuidfor the organization -
project_id: the id of the data project where the pipeline data is found -
pipeline_id: anarrayofstringswhich should be valid UUIDs for pipelines -
date: astringformatted as an ISO date representing the date of the field assessment -
log_distance: afloatrepresenting the log distance of the anomaly measured in meters -
girth_weld: aintegerrepresenting the girth weld number of the joint being inspected -
anomaly_orientation_hours: aintegerrepresenting the circumferential position of the starting point of the anomaly measured in clock position the hour part -
anomaly_orientation_minutes: aintegerrepresenting the circumferential position of the starting point of the anomaly measured in clock position the minute part -
measured_wall_thickness: afloatrepresenting the measured wall thickness from a location not affected by corrosion (i.e the original wall thickness). -
measured_remaining_wall_thickness: afloatrepresenting the measured wall thickness from the river bottom of the anomaly -
surface_location: astringthe surface location of the anomaly being inspected possible valuesEXT: externalINT: internalMID: midwallUNK: unknown
-
measured_length: afloatrepresenting the measured length of the anomaly -
measured_width: afloatrepresenting the measured width of the anomaly -
measured_max_depth: afloatrepresenting the measured max depth of the anomaly -
purpose_of_measurement: astringthe reason for the measurement (e.g. ILI verification/Repair) -
tool_accuracy: afloatrepresenting the accuracy of the measurement tool -
pit_gauge_accuracy: afloatrepresenting the accuracy of the pit gauge tool. -
inspector: astringrepresenting the identifier of the inspector -
remarks: astringfor any additional remarks about the inspection
Creating the function on the platform
To create this function on the platform using the cli set up the port forwarding as shown in README.
Then run the following command to create the function.
cargo run functions create \
-f functions/field_assessment \
-d "Adds field assessment reports" \
-i org_id=string \
-i project_id=string \
-i pipeline_id=array \
-i date=string \
-i log_distance=float \
-i girth_weld=integer \
-i anomaly_orientation_hours=integer \
-i anomaly_orientation_minutes=integer \
-i measured_wall_thickness=float \
-i measured_remaining_wall_thickness=float \
-i surface_location=string \
-i measured_length=float \
-i measured_width=float \
-i measured_max_depth=float \
-i purpose_of_measurement=string \
-i tool_accuracy=float \
-i pit_gauge_accuracy=float \
-i inspector=string \
-i remarks=string
Testing the function locally
You can run and test the function locally by running
cargo run
Then you can check it work with curl as follows
jq '. | tojson' functions/field_assessment/example_input.json | curl -d '@-' localhost:8080