-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using readUrl with classpath #94
Comments
Hi Mike, Thanks for using our CLI. The cli contains a special dw module to access the file system.
The module looks like this
Also you can create a spell with the cli and open it with the VScode plugin and it should autocomplete the functions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
So im trying to write a Dataweave CLI script that loades the files from filesystem during runtime. The only command as i am aware of can read files from the filesystem i readUrl via classpath. (Maybe there's another one?) Now since this is not a Java-projekt i don't realy know where dataweave is tring to open the files from. Tried to read files from root-folder, from my current running folder, relative from the binary location and tried setting DW_HOME but nothing works. Is this a bug or do we only need some extra documenation on this?
Dataweave CLI rocks, thanks!
To Reproduce
Trying to run this command
Example raml file
dw run -i api=api.raml 'input api application/yaml --- api.resourceTypes mapObject ((value, key) -> (key): readUrl(("classpath://" ++ value),"text/plain"))'
Expected behavior
That i would have loaded a few files from my filesystem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: