0

I have one URL. I want to log in into that URL and download the xml file from that URL link. File should be automatically downloaded. Like in PHP, we have CURL call which send request to URL and download the data.

Do we have anything like this in Pentaho? I have gone through "HTTP Client" step but I am not getting how to use it to go and download particular file from URL.

Can someone please guide on this? Thanks in advance!

Nilesh Patil
  • 91
  • 2
  • 11
  • There are many ways to do this. The simplest would be to put the curl executable file on your system and invoke it through a `Shell` scripting job step. Use the `-O` parameter to get the file and then process it with a transform. This won't work however, if you can't put the executable on your system. – Brian.D.Myers Nov 21 '16 at 19:28
  • 1
    Brian I have the executable on my system, but I am still unable to have the script run from a Pentaho Shell command. I'm using a wget command to download a few files, and it works on my Terminal window perfectly. When I try to call it inside pentaho, I get the error 'wget: command not found'. Is this not using my user/PATH? – CDD Oct 11 '17 at 16:39
  • You can use httpclient with a little of js code: https://stackoverflow.com/questions/50547680/how-download-binary-files-with-pentaho/76009230#76009230 – mesompi Apr 13 '23 at 19:43

1 Answers1

0

You can use Shell step in jobs And put following into that step

For Linux, cd 'location where you want file' curl 'url'

For Windows

dir 'location where you want file' curl 'url'