Claus Ibsen created CAMEL-24908:
-----------------------------------
Summary: camel-jbang - tools for data mapping: evaluate a mapping
against a sample document and show the result side by side
Key: CAMEL-24908
URL: https://issues.apache.org/jira/browse/CAMEL-24908
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.23.0
Follow-up from the benchmark work (CAMEL-24886), for the next round rather than
4.23: a model writing a transformation has no way to try it. It writes the
mapping into the route, saves, reloads, reads the log, and repeats; every
mistake costs a reload cycle, and a wrong shape (a list where a map was meant,
a field name that does not exist in the document) is only visible as an
exception.
What the authoring tools are missing, in the order they would help:
* evaluate an expression against a sample document and return the value with
its Java type, for every language the examples use (jsonpath, jq, simple,
groovy, xpath, datasonnet), which is CAMEL-24907
* a mapping preview: the source document in, the expression or the Groovy
script, the produced document out, side by side, so a person and a model can
see the shape they are about to write
* the same for the data formats: unmarshal a sample with the format and its
options and show what the body becomes (a Map, a List of Maps, a POJO), because
the body type is what the next step trips over (see CAMEL-24844)
* the errors of a failed mapping named in terms of the document, "the document
has no field customer at the top level, it has orderId, customer is under
customer.id", rather than a Jackson or JsonPath stack trace
Camel is an integration framework; mapping and manipulating data is most of
what people write in it, and it is the part where an agent has the least
feedback today.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)