gbartolonifcg/dw-cli

By gbartolonifcg

Updated about 1 year ago

Provides DataWeave CLI

Image

22

Overview

The "gbartolonifcg/dw-cli" Docker image is a command line tool to provide an easy way to run the DataWeave CLI (https://github.com/mulesoft-labs/data-weave-cli).

Usage

Here follows the usage instructions of the command:

$ docker run --rm -it gbartolonifcg/dw-cli -h
 ____   __  ____  __   _  _  ____   __   _  _  ____
(    \ / _\(_  _)/ _\ / )( \(  __) / _\ / )( \(  __)
 ) D (/    \ )( /    \\ /\ / ) _) /    \\ \/ / ) _)
(____/\_/\_/(__)\_/\_/(_/\_)(____)\_/\_/ \__/ (____)
Usage: <main class> [-hV] [COMMAND]
  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.
Commands:
  run            Runs provided DW script.
  wizard         Wizard actions.
    add            Adds a new Wizard to your network of trusted wizards.
  validate       Validate if a script is valid or not.
  migrate        Translates a DW1 script into a DW2 script.
  spell          Runs the specified Spell.
    create         Creates a new spell with the given name.
    list           List all available spells.
    update         Update all spells to the latest one.
  help           Display help information about the specified command.
  repl           Starts the DW repl.
Example:

 dw  run -i payload <fullPathToUser.json> "output application/json --- payload
filter (item) -> item.age > 17"

 Documentation reference:

 https://docs.mulesoft.com/dataweave/latest/

Here follows a sample execution to run a script:

$ docker run --rm -it -v $(pwd)/your-input-file.txt:/your-input-file.txt gbartolonifcg/dw-cli run -i payload=/your-input-file.txt "%dw 2.0 input payload application/json output application/json  --- payload"

Keep in contact

Please write to gbartoloni@florence-consulting.it for suggestions, comments and complaints!

Docker Pull Command

docker pull gbartolonifcg/dw-cli