Search code examples
djangopython-3.xdocker-composepentaho-data-integrationgremlin-server

Can we call GET/POST ajax call from Pentaho data integration spoon


I am using Django, Neo4j, and pentaho. In Pentaho Data Integration, we can use the javascript for any transaction. My question is that can we call ajax from the PDI javasticpt to django server method. Actually i want to send success msg to server after the ETL process done by the PDI. Following is the javascript I am trying.

var xhReq = new XMLHttpRequest();
 xhReq.open("GET", "http://127.0.0.1/url_name/?parameter=value", false);
 xhReq.send(); 

Solution

  • Don't re-invent the wheel my friend!, use the "REST Client" step as the last step of your flow, and use the parameters in the step to specify the GET Method and URL with GET parameters to send. After executing the "REST Client" you will get the expected response as you specified in the parameters (maybe a JSON if your server answers it).

    You don't need to code with javascript (actually is possible with User Defined Java Class with coding, but it's a more complex process).