Yesterday I had a surprise once again while I was feeding our 9 months old sun "Risk Rusks". These are little rice crackers a baby can eat. I thought I did something good by buying organic and Presidents Choice is usually a decent brand but whenever I looked at the ingredients I saw the label "Made in China". Why on earth do we have to ship our baby food all the way from China? I guess I have to look for another brand for Risk Rusks now...
Pentaho Data Integration - Multi-part Form submission with file upload using the User Defined Java Class Step
I recently needed to use Pentaho Data Integration (PDI) to send a file to a server for processing using HTTP Post. I spent several hours trying to use the existing steps HTTP Post, HTTP Client & Rest Client but I couldn't get it to work. After some more research I came across the issue PDI-10120 - Support for Multi-part Form Submittal In Web Service Steps and I thought I was out of luck. I previously wrote a small Java client for a similar use case and remembered the PDI has a step called User Defined Java Class (UDJC). After reading this great tutorial I created the following basic transaction. I have a dataset with the URL and the full file path and use the UDJC to make the HTTP call. HTTP Post using User Defined Java Class The Java class handles the actual HTTP Post. It uses 2 input variables, the URL (url) which is used for the call and the file name (longFileName). The HTTP call then contains the file (line 30) and the file name (line 31). I included some...
Comments