The Integrator Server SOAP API has been deprecated as of Jedox 2022.4. If you used this standard to run ETL via macros you will need to change it now. There are two ways of doing that:
- Running ETLS via action buttons (highly recommended)
- Running ETLs via macro using Rest standard
Action buttons are now already well incorporated in many Jedox projects and running ETL via them should be an easy task. However if you have issue to build such a connection, check out this link.
Running ETLs using Rest standard takes a bit of coding but nothings super complex. IF you had SOAP connection-build-macro-report, make a backup of it and then delete all the code.
Have in mind that if you had any IF or any other statements in the code before, make sure to save them.
First we need to call the library require library(‘integrator-rest’);
After that code for running looks like this:
function sampleETL() {
$etlProject = “PROJECT NAME”;
$etlJob = ‘JOB NAME’;
// define array with variables for the Integrator job
$variables = array(
array(‘name’=>’variable1’,’value’=>$variable1),
array(‘name’=>’variable2’,’value’=>$variable2));
$id= integrator_start_job($etlProject,$etlJob,$variables);
define_variable(‘INTEGRATOR_JOB_ID’,$id);
}
if the job takes time and you would like in meantime to access the status of the job, you can do it with the following code:
$ETLID = retrieve_variable(‘INTEGRATOR_JOB_ID’);
$etl_status_array = integrator_set_job_status($ETLID);
$etl_status=array_shift(array_slice($etl_status_array,1,2));
define_variable(‘etl_status’,$etl_status);if($ETLID == “TRUE”) {
return __msgbox(“ No Jobs Executed”. $ETLID,’ETL Status’,’info’);
}if(retrieve_variable(‘etl_status’)==”Failed”) {
$msg=’Job was unsuccessful! ‘;
return array
(array(‘msg’, “”, “Info”, $msg),);
} else if($etl_status == “Completed with Warnings” || $etl_status == “Completed successfully”){$msg=’Job was successful! ‘;
return array
(array(‘msg’, “”, “Info”, $msg),);}
We understand that switching from SOAP to Rest can be stressful process but this code will help overcome it faster.
In case you were wondering what is the difference between SOAP and REST, this table might help: