I have a transformation where I read in a raw application/octet-stream into a stream field using a RESTClient step, which is working correctly. Now, I would like to write the (*.jpg) file to the local filesystem. What is the best/easiest way to do this?
I found this snippet that uses the User defined Java class step, but the example gets the file content from a column instead of a stream field. But it seems like what I might need.
https://naimishgohil.wordpress.com/2016/06/09/extraction-of-blob-content-using-pentaho-kettle-ce/
I tried referencing the stream field in the UJDC step, but I'm apparently not using the correct syntax or don't understand the step well enough.
Any help is appreciated!
Turns out, RTFM worked. I found this reference useful for figuring out how to get stream data into the UDJC step:
https://hop.apache.org/manual/latest/pipeline/transforms/userdefinedjavaclass.html
Once I used the proper syntax and grabbed my dynamic values from the stream, everything works as expected.