Claus Ibsen created CAMEL-25471:
-----------------------------------

             Summary: camel-dataweave - convert real-world Mule DataWeave 
scripts faithfully
                 Key: CAMEL-25471
                 URL: https://issues.apache.org/jira/browse/CAMEL-25471
             Project: Camel
          Issue Type: Improvement
            Reporter: Claus Ibsen
             Fix For: 4.23.0


Umbrella for making the DataWeave to DataSonnet converter (camel-dataweave, 
used by the datasonnet language and camel transform dataweave) good enough for 
migrating real Mule DataWeave 2.x scripts.

An analysis ran 233 realistic DataWeave snippets (plus 10 Mule-style scripts) 
through the converter and executed the generated DataSonnet in a Camel route 
against the output DataWeave produces:

* 109 correct
* 93 silently wrong: converted with no TODO, then 22 return a wrong value and 
71 fail on every message at runtime
* 16 parse errors, 3 invalid DataSonnet caught at startup, 12 honest TODOs

Root causes: the parser drops trailing tokens and unknown header lines; 
DataWeave 2 lambda syntax and infix precedence are not followed; DataWeave 
null/selector semantics (missing field = null, selector on array = implicit 
map) are not modelled; unknown functions pass through; object construction 
(conditional fields, spread) and ranges are not supported.

The goal is that every DataWeave script either converts to DataSonnet that 
produces the same output, or fails at conversion time - never silently wrong. 
DataSonnet's built-in ds.* library (modelled on DataWeave) is used where it 
matches DataWeave semantics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to