Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

alevy
2012-09-14 04:22:51

@Xan: you should start a new topic but look at tWaitForSqlData.

Xan
2012-09-13 23:20:08

Hi Shong

Can you please show the job when  a flag in database changes, an email will be triggered?
Meaning, when a boolean field in database is true, I would want to trigger an email. Can you please help on this?


Thanks

yan870126
2010-02-11 04:22:00

Hi Shong,
   If it's the value changed, and it's on MySQL DB. how it will be done?

Thanks
Yong

shong
2010-02-01 03:48:42

Hello Sebastian
Do you mean the value of field is changed or the field name is changed? If you point to the filed name, Here I gave you a hint.
Before runnning the job for the first time, write download a string of all column name in a file. At the beginning of job, using a tFileInputFullRow to read the string, and using tMssqlColumnList to iterate each column name and concatenate them to a string, compare it with last string of all column name, if it is not equlas, means that the filed name have been change, fires another child job. (See my screenshots)

start code on tJavaFlex:

Code:

// start part of your Java code
String stringOfAllCurrentColumnName="";

main code on tJavaFlex:

Code:

if(stringOfAllCurrentColumnName.equals("")){
stringOfAllCurrentColumnName=((String)globalMap.get("tMSSqlColumnList_1_COLUMN_NAME"));
}else{
stringOfAllCurrentColumnName=stringOfAllCurrentColumnName+";"+((String)globalMap.get("tMSSqlColumnList_1_COLUMN_NAME"));
}

end code on tJavaFlex:

Code:

// end of the component, outside/closing the loop
String lastStringOfAllColumnName=(String)globalMap.get("lastStringOfAllColumnName");
if(!lastStringOfAllColumnName.equals(stringOfAllCurrentColumnName)){
context.flag=true;
}else{
context.flag=false;
}
globalMap.put("stringOfAllCurrentColumnName",stringOfAllCurrentColumnName);

Best regards

          shong

Sebastian1234
2010-01-31 17:12:45

Hello,

i need a hint for a job:

I want that the Talend Job run if a field changed in a database (MS SQL Database).

I can build a 5min Job or anything else.

Thanks
Sebastian

Board footer

Powered by FluxBB