Hi,
I have A database(mysql) and B database(sqlserver)
On A database(mysql):
public class MyFilter extends DatabaseWriterFilterAdapter implements ISymmetricEngineAware {
protected ISymmetricEngine engine;
@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();
//CsvData data and ISqlTemplate myengine belongs to A database
//I want to write A(CsvData data) to B,How can I write code?
}
Thanks for any help,
Ike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have A database(mysql) and B database(sqlserver)
On A database(mysql):
public class MyFilter extends DatabaseWriterFilterAdapter implements ISymmetricEngineAware {
protected ISymmetricEngine engine;
Thanks for any help,
Ike
See my post here:
https://sourceforge.net/p/symmetricds/discussion/739236/thread/615f0a9f0d/?limit=25
This is exactly what I need, thank you very much.