diff --git a/conditor-dumps-config.json b/conditor-dumps-config.json index 74354b1..a3acd70 100644 --- a/conditor-dumps-config.json +++ b/conditor-dumps-config.json @@ -1,23 +1,15 @@ { - "environnement": { - "CRON_VERBOSE": true, - "EZS_VERBOSE": false, - "EZS_PIPELINE_DELAY": 28800, - "TMPDIR": "/tmp" - }, - "files": { - "zip": "https://gitbucket.inist.fr/tdm/web-dumps/archive/conditor-dumps/conditor-dumps@1.13.0.zip" - }, - "tasks": [ - { - "Target": "watch", - "RunOnStartup": true - } - ], - "packages": [ - "@ezs/core@2.4.1", - "@ezs/basics@1.23.2", - "@ezs/conditor@2.10.3", - "@ezs/analytics@2.0.18" - ] -} \ No newline at end of file + "environnement": { + "EZS_VERBOSE": false, + "EZS_PIPELINE_DELAY": 3600 + }, + "files" : { + "zip": "https://gitbucket.inist.fr/tdm/web-dumps/archive/conditor-dumps/conditor-dumps@1.14.0.zip" + }, + "packages": [ + "@ezs/analytics@2.0.19", + "@ezs/basics@1.23.3", + "@ezs/conditor@2.10.3", + "@ezs/core@2.4.2" + ] +} diff --git a/conditor-dumps/04-enrich.ini b/conditor-dumps/04-enrich.ini index 827627f..d7d455b 100644 --- a/conditor-dumps/04-enrich.ini +++ b/conditor-dumps/04-enrich.ini @@ -229,23 +229,47 @@ cacheName = 04-address-expand [map/expand/URLConnect] -url = https://affiliations-tools.services.inist.fr/v1/expand +url = https://affiliations-tools.services.inist.fr/v1/addresses/parse timeout = 90007 noerror = true +[map/expand/assign] +path = value.value.address +value = get('value.id') + +path = value.value.country +value = get('value.value.country').replace(/\W/g, ' ').trim() + +[map/expand/assign] +path = value +value = get('value.value') + +[map/expand/expand] +path = value.country +size = 10 +cacheName = 04-country-expand + +[map/expand/expand/URLConnect] +url = https://loterre-resolvers.services.inist.fr/v1/9SD/identify +timeout = 90008 + +[map/exchange] +value = get('value') + # TODO: si champ state, on est aux États-Unis (United States of America) [assign] path = ApilWsCodeISO value = get("ws.libpostal").castArray().filter(Boolean) \ - .map(n => n.value?.country?.cartographyCode) \ + .map(n => n.country?.cartographyCode) \ .uniq().filter(Boolean) path = ApilWsCountry value = get("ws.libpostal").castArray().filter(Boolean) \ - .map(n => n.value?.country?.["prefLabel@en"]) \ + .map(n => n.country?.["prefLabel@en"]) \ .uniq().filter(Boolean) - +[debug] +text = XXX # Suppression des champs non voulus [exchange] value = omit(['tmp'])