forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from eodcgmbh/add-run-udf
add run_udf
- Loading branch information
Showing
1 changed file
with
103 additions
and
0 deletions.
There are no files selected for viewing
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,103 @@ | ||
{ | ||
"id": "run_udf", | ||
"summary": "Run a UDF", | ||
"description": "Runs a UDF in one of the supported runtime environments.\n\nThe process can either:\n\n1. load and run a UDF stored in a file on the server-side workspace of the authenticated user. The path to the UDF file must be relative to the root directory of the user's workspace.\n2. fetch and run a remotely stored and published UDF by absolute URI.\n3. run the source code specified inline as string.\n\nThe loaded UDF can be executed in several processes such as ``aggregate_spatial()``, ``apply()``, ``apply_dimension()`` and ``reduce_dimension()``. The user must ensure that the data is given in a way that the UDF code can make sense of it.", | ||
"categories": [ | ||
"cubes", | ||
"import", | ||
"udf" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "data", | ||
"description": "The data to be passed to the UDF.", | ||
"schema": [ | ||
{ | ||
"title": "Array", | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"description": "Any data type." | ||
} | ||
}, | ||
{ | ||
"title": "Single Value", | ||
"description": "A single value of any data type." | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "udf", | ||
"description": "Either source code, an absolute URL or a path to a UDF script.", | ||
"schema": [ | ||
{ | ||
"description": "Absolute URL to a UDF", | ||
"type": "string", | ||
"format": "uri", | ||
"subtype": "uri", | ||
"pattern": "^https?://" | ||
}, | ||
{ | ||
"description": "Path to a UDF uploaded to the server.", | ||
"type": "string", | ||
"subtype": "file-path", | ||
"pattern": "^[^\r\n\\:'\"]+$" | ||
}, | ||
{ | ||
"description": "The multi-line source code of a UDF, must contain a newline/line-break.", | ||
"type": "string", | ||
"subtype": "udf-code", | ||
"pattern": "(\r\n|\r|\n)" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "runtime", | ||
"description": "A UDF runtime identifier available at the back-end.", | ||
"schema": { | ||
"type": "string", | ||
"subtype": "udf-runtime" | ||
} | ||
}, | ||
{ | ||
"name": "version", | ||
"description": "An UDF runtime version. If set to `null`, the default runtime version specified for each runtime is used.", | ||
"schema": [ | ||
{ | ||
"type": "string", | ||
"subtype": "udf-runtime-version" | ||
}, | ||
{ | ||
"title": "Default runtime version", | ||
"type": "null" | ||
} | ||
], | ||
"default": null, | ||
"optional": true | ||
}, | ||
{ | ||
"name": "context", | ||
"description": "Additional data such as configuration options to be passed to the UDF.", | ||
"schema": { | ||
"description": "Any data type." | ||
}, | ||
"default": {}, | ||
"optional": true | ||
} | ||
], | ||
"exceptions": { | ||
"InvalidRuntime": { | ||
"message": "The specified UDF runtime is not supported." | ||
}, | ||
"InvalidVersion": { | ||
"message": "The specified UDF runtime version is not supported." | ||
} | ||
}, | ||
"returns": { | ||
"description": "The data processed by the UDF. The returned value can be of any data type and is exactly what the UDF code returns.", | ||
"schema": { | ||
"title": "Any", | ||
"description": "Any data type." | ||
} | ||
} | ||
} |