🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

What is the correct syntax to use Execute program on Linux?

User: "kayman"
New Altair Community Member
Updated by Jocelyn

Hi there,

 

I currently have a CRON trigger that executes a script on a daily base on my server, but I want to be able to do the same from within Rapidminer on demand.

 

As far as I understand the Execute Command operator should allow me to do that, but as nothing seems to happen (also no errors thrown) I am not sure I use it correctly.

 

My command is a curl command that loads a json file to my elastic search environment. Running this as a standard bash or sh file works fine, all my data is loaded to elastic, but running the same command in the operator just does nothing. I get a green tick indicating the process ran fine, but no data is transfered.

 

My curl command is as follows :

 

curl -s -H "Content-Type: application/x-ndjson" -XPOST http://localhost:9200/_bulk --data-binary "@mydata.json"

 

And this is my process :

<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="productivity:execute_program" compatibility="7.6.001" expanded="true" height="103" name="Execute Program" width="90" x="112" y="34">
<parameter key="command" value="curl -s -H &quot;Content-Type: application/x-ndjson&quot; -XPOST http://localhost:9200/_bulk --data-binary &quot;@mydata.json&quot;"/>
<parameter key="working_directory" value="/data/elastic/imports"/>
<list key="env_variables"/>
</operator>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
</process>
</operator>
</process>

Any idea if I am using it correctly?

or other tips?

 

Find more posts tagged with