Hi, A database (mysql) B database (sqlserver)
on A(mysql) use
public class MyFilter extends DatabaseWriterFilterAdapter implements ISymmetricEngineAware{ @Override public void setSymmetricEngine(ISymmetricEngine engine) { this.engine = engine; } @Override public void afterWrite(DataContext context, Table table, CsvData data) { if (table.getName().equalsIgnoreCase("HR_ATS_Holiday") && data.getDataEventType().equals(DataEventType.INSERT)) { ISqlTemplate myengine = engine.getSqlTemplate();
//now, CsvData data and ISqlTemplate myengine is B //I want to write B.data to A } }---
Thanks! ike
Ike - you could look up en engine like this.
ISymmetricEngine engine = AbstractSymmetricEngine.findEngineByName(engineName);
This is exactly what I need, thank you very much.
Log in to post a comment.
Hi,
A database (mysql)
B database (sqlserver)
on A(mysql) use
public class MyFilter extends DatabaseWriterFilterAdapter implements ISymmetricEngineAware{
@Override
public void setSymmetricEngine(ISymmetricEngine engine) {
this.engine = engine;
}
@Override
public void afterWrite(DataContext context, Table table, CsvData data) {
if (table.getName().equalsIgnoreCase("HR_ATS_Holiday")
&& data.getDataEventType().equals(DataEventType.INSERT)) {
ISqlTemplate myengine = engine.getSqlTemplate();
Thanks!
ike
Ike - you could look up en engine like this.
ISymmetricEngine engine = AbstractSymmetricEngine.findEngineByName(engineName);
This is exactly what I need, thank you very much.