Search code examples
batch-filecmdpentaho-spoon

Curl call working in cmd but not in .bat


Following code is working perfectly fine when ran from cmd, but it fails (Access Denied) when ran as bat from Pentaho DI.

curl -k --data "data=username%%3[DUSERNAME]%%26password%%3D[PASSWORD]%%26pid%%3D[1]%%26lid%%3D[2]" https://[...]/export/csv.php -o [...]\output.csv

Anything specific I should be aware of? Assuming the issue lies in credentials part.


Solution

  • I have managed to fix it by creating external .bat file and calling it with Pentaho's Shell function. Previously I was implementing the code inside Pentaho (it creates then temp .bat file on run time).