-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathrun_udf.json
109 lines (109 loc) · 4.26 KB
/
run_udf.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"id": "run_udf",
"summary": "Run an UDF",
"description": "Runs an UDF in one of the supported runtime environments.\n\nThe process can either:\n\n1. load and run a locally stored UDF from a file in the 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, for example from [openEO Hub](https://hub.openeo.org)).\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()``. In this case an array is passed instead of a raster data cube. The user must ensure that the data is properly passed as an array so that the UDF can make sense of it.",
"categories": [
"cubes",
"import",
"udf"
],
"parameters": [
{
"name": "data",
"description": "The data to be passed to the UDF as array or raster data cube.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"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 an UDF script.",
"schema": [
{
"description": "URI to an UDF",
"type": "string",
"format": "uri",
"subtype": "uri"
},
{
"description": "Path to an UDF uploaded to the server.",
"type": "string",
"subtype": "file-path"
},
{
"description": "Source code as string",
"type": "string",
"subtype": "udf-code"
}
]
},
{
"name": "runtime",
"description": "An 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 that should be passed to the UDF.",
"schema": {
"type": "object"
},
"default": {},
"optional": true
}
],
"exceptions": {
"InvalidVersion": {
"message": "The specified UDF runtime version is not supported."
}
},
"returns": {
"description": "The data processed by the UDF.\n\n* Returns a raster data cube, if a raster data cube is passed for `data`. Details on the dimensions and dimension properties (name, type, labels, reference system and resolution) depend on the UDF.\n* If an array is passed for `data`, the returned value can be of any data type, but is exactly what the UDF returns.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"title": "Any",
"description": "Any data type."
}
]
}
}