44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
# Aggregate all matched anomalies
|
|
|
|
Runs the algorithm to aggregate all the matched anomalies across ILI runs.
|
|
|
|
## Input
|
|
|
|
### Arguments
|
|
|
|
- `org_id`: as string which should be a valid `uuid` for the organization
|
|
- `project_id`: the id of the data project where the pipeline data is found
|
|
- `pipeline_id`: an `array` of `strings` which should each be a valid uuid representing a pipeline.
|
|
|
|
Note the pipeline_id array and route_file array should be the length such that
|
|
the first entry in each array corresponds to one another.
|
|
|
|
## 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.
|
|
|
|
```bash
|
|
cargo run functions create \
|
|
-f functions/aggregate_all_comparisons/ \
|
|
-d "Run algorithm to aggregate all matched anomalies from all ILI comparison runs" \
|
|
-i org_id=string \
|
|
-i project_id=string \
|
|
-i pipeline_id=array
|
|
```
|
|
|
|
## Testing the function locally
|
|
|
|
You can run and test the function locally by running
|
|
|
|
```bash
|
|
cargo run
|
|
```
|
|
|
|
Then you can check it work with `curl` as follows
|
|
|
|
```bash
|
|
curl localhost:8080 -d $(jq '. | tojson' functions/aggregate_all_comparisons/example_input.json)
|
|
```
|