| src | ||
| .DS_Store | ||
| Cargo.lock | ||
| Cargo.toml | ||
| example_input.json | ||
| README.md | ||
Runs the ILI clustering algorithm for all the clustering rules
Clustering criteria for pipeline defects refer to the guidelines or criteria that are used to determine whether a group of defects in a pipeline should be considered a "cluster." These criteria are typically based on a combination of factors, including the size, location, and severity of the defects, as well as the spacing between them. See clustering function readme for more info.
This function runs the clustering algorithm for all the rules for a given ILI report.
Input
Arguments
org_id: as string which should be a validuuidfor the organizationproject_id: the id of the data project where the pipeline data is foundpipeline_id: anarrayofstringswhich should be valid UUIDs for pipelinessize_settings: a string representing the size setting for clustering, possible valuesoriginaltolerance
interaction: a string representing the interaction setting for clustering, possible valuesenableddisabled
surface_location: a string representing the surface location setting for clustering, possible valuesmatchingany
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/ili_clustering_all \
-d "Runs the ILI clustering algorithm" \
-i org_id=string \
-i project_id=string \
-i pipeline_id=array \
-i ili_id=array \
-i size_settings=string \
-i interaction=string \
-i surface_location=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
curl localhost:8080 -d $(jq '. | tojson' functions/ili_clustering_all/example_input.json)