0

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!

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.