Hello everybody,
for a current feature request I am trying to make a web spreadsheet similar to the one in Jedox Demo Spreadsheets "ETL Tools".
The goal is to select Jobs and start them from within the web.
Unfortunately I cannot even make the demo work, since it cannot generate the Project and Job list.
I've seen that there is no login in the code, but it is required. The problem is, that I have no knowledge in PHP. I had a look at the knowledgebase article but the code is considerably different in the examples given in the article compared to the demo version.
Does anybody have an update on the code?
here is the original from the Demo Spreadsheet "ETL Tools":
in comparison to extracts from the knowledgebase article
I would basically just like to have the demo working, since there is a need to start jobs by people who don't or at least shouldn't have access to the integrator.
Any help is very much appreciated.
Thank you very much in advance.
for a current feature request I am trying to make a web spreadsheet similar to the one in Jedox Demo Spreadsheets "ETL Tools".
The goal is to select Jobs and start them from within the web.
Unfortunately I cannot even make the demo work, since it cannot generate the Project and Job list.

I've seen that there is no login in the code, but it is required. The problem is, that I have no knowledge in PHP. I had a look at the knowledgebase article but the code is considerably different in the examples given in the article compared to the demo version.
Does anybody have an update on the code?
here is the original from the Demo Spreadsheet "ETL Tools":
Source Code
- // adapt protocol, host, port here to match your setup
- define('ETL_URL','http://10.59.231.53:7775');
- // wait for job to finish prior returning status
- define('WAIT_FOR_FINISH', true);
- // max execution time of script in seconds used in combination with WAIT_FOR_FINISH
- define('MAX_EXECUTION_TIME', 10);
- function getStatus()
- {
- $s = activesheet();
- $id = $s->range('B15')->value;
- return getStatusFromId($id);
- }
- // fetch status and write it into cell
- function getStatusFromId($id)
- {
- $s = activesheet();
- $server = @new SoapClient(ETL_URL . '/etlserver/services/ETL-Server?wsdl', array('exceptions' => true) );
- $response = $server->getExecutionStatus(array('id' => $id, 'waitForTermination' => false));
- $return = $response->return;
- $s->range('D16')->value = $return->status;
- return $return->statusCode;
- }
- // fetch list of projects
- function getProjects()
- {
- $server = new SoapClient(ETL_URL . '/etlserver/services/ETL-Server?wsdl', array('exceptions' => true) );
- $res = $server->getNames();
- if(count($res->return) == 0) {
- return '';
- }
- return $res->return;
- }
- // fetch list of jobs
- function getJobs($job)
- {
- if( empty($job) ) return '';
- $server = new SoapClient(ETL_URL . '/etlserver/services/ETL-Server?wsdl', array('exceptions' => true) );
- $res = $server->getNames(array('locator' => $job.'.jobs'));
- if( !$res->return ) return '';
- return $res->return;
- }
in comparison to extracts from the knowledgebase article
Source Code
- $wsdl_url = 'http://127.0.0.1:7775/etlserver/services/ETL-Server?wsdl';
- $server = @new SoapClient($wsdl_url, array('exceptions' => true, 'location' => $wsdl_url));
- // do login attempt on soap object
- $login_attempt = $server->login(array('user' => 'admin', 'password' => 'admin'))->return;
- $session = $login_attempt->result;
- // set the returned session as soap header
- $header = new SoapHeader('http://ns.jedox.com/ETL-Server/', 'etlsession', $session);
- $server->__setSoapHeaders($header);
- // get list of available integrator projects
- $result = $server->getNames();
- // set empty string if no projects exist
- if(count($result->return) == 0) {
- $project_list = '';
- }
- $project_list = $result->return;
- // get list of jobs in a project
- $project_name = 'sampleBiker';
- $result = $server->getNames(array('locator' => $project_name.'.jobs'));
- if(count($result->return) == 0) {
- $job_list = '';
- }
- $job_list = $result->return;
- // execute integrator job
- // set the locator to be used for the execution, job with name "default" on project "sampleBiker"
- $locator = 'sampleBiker.jobs.default';
- // set the variables to be used for the execution
- $variables = array(array('name' => 'variable_year', 'value' => 2016), array('name' => 'variable_datatype', 'value' => 'Budget'));
- // execute the job
- $result = $server->execute(array('locator' => $locator, 'variables' => $variables));
- $job_execution = $result->return;
I would basically just like to have the demo working, since there is a need to start jobs by people who don't or at least shouldn't have access to the integrator.
Any help is very much appreciated.
Thank you very much in advance.