Talend Open Studio is an open source solution for data integration. It has GUI interface which allows user to easily create procedure for data import. For instance, import from CSV file to MySQL database table.
User can run job directly from Talend Open Studio. Another option is to build job as a standalone procedure which requires only Java Runtime Environment.
There is a convenient library for integrating standalone jobs in PHP application. Name of the library is Talend Runner PHP and GIT repository is on following link:
Create Talend job:
Select build job in context menu
Build job as a standalone component:
It will generate following folder structure:
Example of library usage in PHP application:
$jobPath = '/path-to-jobs/TestJob_0.1/TestJob/TestJob_run';
$talendRunner = new TalendRunner($jobPath);
$output = $talendRunner->run();
Let us take an example that application is hosted on Linux. In that case procedure should be invoked by executing file with .sh extension (/path-to-jobs/TestJob_0.1/TestJob/TestJob_run.sh). Apart from .sh file there is .bat file for invoking job on Windows opetating system. However, job path in constructor should be without extension (e.g. /path-to-jobs/TestJob_0.1/TestJob/TestJob_run). Library will append appropriate extension depending on operating system. It makes your code portable between operating system since you don’t have to change .sh to .bat when application is moved from Windows to Linux.