Repository navigation
Expand file tree
/
Copy pathprocessing-config-schema.json
More file actions
242 lines (242 loc) · 8.14 KB
/
Copy pathprocessing-config-schema.json
File metadata and controls
242 lines (242 loc) · 8.14 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
"x-exports": ["types", "validate"],
"title": "ProcessingConfig",
"type": "object",
"layout": "tabs",
"required": ["dataset", "fields", "label", "filename"],
"allOf": [
{
"title": "Dataset",
"x-i18n-title": { "fr": "Jeu de données" },
"properties": {
"dataset": {
"type": "object",
"title": "Existing dataset",
"x-i18n-title": { "fr": "Jeu de données existant" },
"properties": {
"id": {
"type": "string",
"title": "Identifier",
"x-i18n-title": { "fr": "Identifiant" }
},
"href": {
"type": "string",
"title": "URL",
"x-i18n-title": { "fr": "URL" }
},
"title": {
"type": "string",
"title": "Title",
"x-i18n-title": { "fr": "Titre" }
}
},
"layout": {
"getItems": {
"url": "${context.dataFairUrl}/api/v1/datasets?select=id,title&size=50&${context.ownerFilter}",
"qSearchParam": "q",
"itemsResults": "data.results",
"itemTitle": "item.title",
"itemKey": "item.id"
}
}
}
}
},
{
"title": "Parameters",
"x-i18n-title": { "fr": "Paramètres" },
"properties": {
"fields": {
"type": "array",
"title": "Dataset columns",
"x-i18n-title": { "fr": "Colonnes du jeu de données" },
"description": "Leave empty to export every column of the dataset except the calculated ones.",
"x-i18n-description": { "fr": "Laisser vide pour exporter toutes les colonnes du jeu de données, sauf les colonnes calculées." },
"items": {
"type": "object",
"properties": {
"key": { "type": "string" },
"label": { "type": "string" },
"type": { "type": "string" }
}
},
"layout": {
"comp": "autocomplete",
"getItems": {
"url": "${rootData.config.dataset.href}/schema?calculated=false",
"itemTitle": "item.label",
"itemKey": "item.key",
"itemIcon": "null"
}
},
"default": []
},
"format": {
"type": "array",
"title": "Output file formats",
"x-i18n-title": { "fr": "Format de sortie des fichiers" },
"description": "Select multiple formats to generate multiple files. Excel cannot open a worksheet with more than 1,048,575 rows: beyond that the xlsx file is not generated.",
"x-i18n-description": { "fr": "Sélectionner plusieurs formats pour générer plusieurs fichiers. Excel ne peut pas ouvrir une feuille de plus de 1 048 575 lignes : au-delà, le fichier xlsx n'est pas généré." },
"layout": "select",
"items": {
"type": "string",
"enum": [
"csv",
"parquet",
"xlsx",
"geojson",
"pmtiles",
"shp",
"gpkg"
]
},
"default": ["csv"]
},
"filename": {
"type": "string",
"title": "File name (without extension)",
"x-i18n-title": { "fr": "Nom du fichier (sans l'extension)" },
"default": "export"
},
"label": {
"type": "string",
"title": "Attachment label",
"x-i18n-title": { "fr": "Libellé de la pièce jointe" },
"description": "Title given to each attachment, followed by its format in parentheses, e.g. \"Export (csv)\".",
"x-i18n-description": { "fr": "Titre donné à chaque pièce jointe, suivi de son format entre parenthèses, par exemple « Export (csv) »." },
"default": "Export"
},
"filters": {
"$ref": "#/definitions/filters"
}
}
}
],
"definitions": {
"filters": {
"title": "Predefined filters",
"x-i18n-title": { "fr": "Filtres prédéfinis" },
"type": "array",
"items": {
"type": "object",
"default": {
"type": "in"
},
"oneOfLayout": {
"label": "Filter type",
"x-i18n-label": { "fr": "Type de filtre" }
},
"required": ["type"],
"oneOf": [
{
"title": "Restrict to values",
"x-i18n-title": { "fr": "Restreindre à des valeurs" },
"required": ["field"],
"properties": {
"type": {
"const": "in"
},
"field": {
"$ref": "#/definitions/filterField"
},
"values": {
"type": "array",
"title": "Values",
"x-i18n-title": { "fr": "Valeurs" },
"items": {
"type": "string"
},
"layout": {
"getItems": {
"url": "${rootData.config.dataset.href}/values/${parent.data.field.key}?q_mode=complete&size=100&stringify=true",
"qSearchParam": "q"
}
}
}
}
},
{
"title": "Restrict to a value range",
"x-i18n-title": { "fr": "Restreindre à un intervalle de valeurs" },
"required": ["field"],
"properties": {
"type": {
"const": "interval"
},
"field": {
"$ref": "#/definitions/filterField"
},
"minValue": {
"type": "string",
"title": "Min value",
"x-i18n-title": { "fr": "Valeur min" },
"layout": {
"getItems": {
"url": "${rootData.config.dataset.href}/values_agg?field=${parent.data.field.key}&sort=${parent.data.field.key}&${parent.data.field.key}_gte={q}&stringify=true",
"itemsResults": "data.aggs",
"itemTitle": "item.value",
"itemValue": "JSON.stringify(item.value)"
}
}
},
"maxValue": {
"type": "string",
"title": "Max value",
"x-i18n-title": { "fr": "Valeur max" },
"layout": {
"getItems": {
"url": "${rootData.config.dataset.href}/values_agg?field=${parent.data.field.key}&sort=-${parent.data.field.key}&${parent.data.field.key}_lte={q}&stringify=true",
"itemsResults": "data.aggs",
"itemTitle": "item.value",
"itemValue": "JSON.stringify(item.value)"
}
}
}
}
},
{
"title": "Exclude values",
"x-i18n-title": { "fr": "Exclure des valeurs" },
"required": ["field"],
"properties": {
"type": {
"const": "out"
},
"field": {
"$ref": "#/definitions/filterField"
},
"values": {
"type": "array",
"title": "Values to exclude",
"x-i18n-title": { "fr": "Valeurs à exclure" },
"items": {
"type": "string"
},
"layout": {
"getItems": {
"url": "${rootData.config.dataset.href}/values/${parent.data.field.key}?q_mode=complete&size=100&stringify=true",
"qSearchParam": "q"
}
}
}
}
}
]
}
},
"filterField": {
"type": "object",
"title": "Filter column",
"x-i18n-title": { "fr": "Colonne de filtre" },
"layout": {
"comp": "autocomplete",
"getItems": {
"url": "${rootData.config.dataset.href}/schema?calculated=false",
"itemTitle": "item.label",
"itemKey": "item.key",
"itemIcon": "null"
}
}
}
}
}