The supplier file goes to EDI in ASCII with a stable id
Goal Send EDI the suppliers in the form it requires, with an id that does not change.
Purchasing's EDI platform requires names in ASCII, upper case, at most 35 characters, and one id per supplier. The ERP's export has accents, long company names, inactive suppliers, and ids that read N/A, 0 or nothing.
names put in the EDI's form;
N/A and 0 emptied and counted, a missing id derived from the code;
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata:name: scenario-suppliers-bconnector_type: csv-filescopes: [purchasing-b]spec:transport:kind: localpath: /tmp/lumnik-scenario/supplier-master-edi/b/suppliers.csvparser:delimiter: ";"after_process: nonemapping:dataset: - filter-where: { column: ACTIF, equals: "O" } # inactive suppliers out, countedrow: - map-columns:rename: { FOURN_CODE: code, FOURN_NOM: name, ACTIF: active, EXT_ID: ext_id, PAYS: country }-defaults: { country: FR } # an empty country is Francecell: - remove-diacritics: { columns: [name] } # Électricité -> Electricite-upper: { columns: [name] } - regex-replace: { column: name, pattern: "&", replacement: " ET " } - regex-replace: { column: name, pattern: "[^A-Z0-9 ]", replacement: " " } # what the EDI refuses - regex-replace: { column: name, pattern: " +", replacement: " " }-clean: { columns: [name], strip: true }-truncate: { column: name, length: 35 } # the EDI's hard limit - to-uuid: { column: ext_id, on-invalid: "null", generate-from: code } # junk emptied, counted; an empty id derived from the code
$ lm apply -f 11-suppliers-policy.yamlApplied connector "scenario-suppliers-b" — 1 endpoint$ lm endpoint reset-cursor scenario-suppliers-b/default$ lm connector run scenario-suppliers-brun scheduled: d24b789d-c390-4764-a8ab-c947118b768e$ lm run get d24b789d-c390-4764-a8ab-c947118b768eID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED
d24b789d scenario-suppliers-b default Completed 8 6 2 0 2026-11-03 15:51 2026-11-03 15:51⚠ 2 cell(s) a hook did not deliver as declared — the rows were still written$ lm entity get supplier_bCODE NAME EXT_ID COUNTRY _CONFLICTS
F0001 SOCIETE GENERALE D EQUIPEMENTS INDU FR {}
F0002 ELECTRICITE MENARD ET FILS 3f2b8c1e-5a7d-4c2e-9b1f-0a6d8e4c2b71 FR {}
F0004 TRANSPORTS LEFEVRE 673eb8c7-b4b2-3a79-91c0-7f21160d86f4 FR {}
F0005 SOCIETE GENERALE D EQUIPEMENTS INDU 7c9e6679-7425-40de-944b-e07fc1f90ae7 FR {}
F0006 GARAGE MULLER DE {}
F0007 IMPRIMERIE COTE S A 4a515c7a-0e97-3802-b74d-7e5c916331b5 BE {}
$ lm connector run scenario-suppliers-brun scheduled: e381bc54-9178-42d6-83d7-6240412ab7fc$ lm run get e381bc54-9178-42d6-83d7-6240412ab7fcID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED
e381bc54 scenario-suppliers-b default Completed 9 7 2 0 2026-11-03 15:51 2026-11-03 15:51⚠ 2 cell(s) a hook did not deliver as declared — the rows were still written$ lm entity get supplier_bCODE NAME EXT_ID COUNTRY _CONFLICTS
F0001 SOCIETE GENERALE D EQUIPEMENTS INDU FR {}
F0002 ELECTRICITE MENARD ET FILS 3f2b8c1e-5a7d-4c2e-9b1f-0a6d8e4c2b71 FR {}
F0004 TRANSPORTS LEFEVRE 673eb8c7-b4b2-3a79-91c0-7f21160d86f4 FR {}
F0005 SOCIETE GENERALE D EQUIPEMENTS INDU 7c9e6679-7425-40de-944b-e07fc1f90ae7 FR {}
F0006 GARAGE MULLER DE {}
F0007 IMPRIMERIE COTE S A 4a515c7a-0e97-3802-b74d-7e5c916331b5 BE {}
F0009 CARTONNAGES DUBOIS a9a76ea1-bb08-30e3-bab4-27ecf986ea99 FR {}