At the moment I try to optimize a bidirectional connection between an interface database and a Sage database.
I nearly solved the whole problem. I still have one big problem.
The data goes from one mysql table to one or more mssql tables. If there is no content in the mysql databas the job
should not run. If there is content the job should run.
At the moment the job runs under an inifinite loop. This is no good solution.
Where and how to place the statement?
Hi
To determine a table is empty or not, only select one row from the table, for example:
tMysqlInput_1--main--tJavaRow
|
tJava---runIf---next processing
on tMysqlInput_1, write the query as below:
"select * from tableName limit 1"
There is a global variable ((Integer)globalMap.get("tMysqlInput_1_NB_LINE")) counts the total number of rows are queried.
on tJava:
if(((Integer)globalMap.get("tMysqlInput_1_NB_LINE"))>0){
globalMap.put("isContinue",true);
}else{
globalMap.put("isContinue", false);
}
set the condition of runIf as:
(Boolean)globalMap.get("isContinue")
The next processing will fires if the table has at least one row.
Best regards
Shong