Mule Dataweave fixed width fiddle Subscribe Pub Share

Having worked with the very interesting Dataweave components from Mulesoft, I realized that we can accelerate development of solutions involving flatfile and fixed width a lot, with a simple online Fiddle, where we can test both the schema, see what the input parses into and easily debug data issues.

With fixed width formats, it's very hard to see the data elements, unless you're Nero (yeah, the Matrix-reading one)... so it takes detailed logging and that process lengthens the development cycle. With a fiddle, you can simply paste the input and see what it was parsed into, right away.

The fiddle is here. With a free account, the fiddles will autosave, you can save them and more. It turned out to be especially useful while developing or changing the schema.



You simply paste the input at the top and the schema on the left and see the results, including any parsing errors, on the right.

Note that this is not using the actual Mulesoft's Dataweave component, since it is not open source, but the parser should do roughly the same thing.

Also, right now it only supports simple schemas with a single segment, as in the example above.

The parser is quite rudimentary, so pay attention to whitespaces etc - report any issues with the "support" link at the bottom.

Of course you can use this to play with any fixed width data, just list the fields in the DWL syntax as in the example above!

Enjoy!


Was this useful?    

By: Razie | 2017-08-06 .. 2017-08-22 | Tags: post , fiddle , mulesoft


See more in: Cool Scala Subscribe

Viewed 966 times ( | History | Print ) this page.

You need to log in to post a comment!