Skip to content
Permalink
Browse files

0003825: Oracle bulk loader using SQL*Loader sqlldr

  • Loading branch information...
elong
elong committed Dec 10, 2018
1 parent 25429b1 commit 4d3078f239b0ab614d89843c5c4f047a4be6ac4f
@@ -24,7 +24,6 @@

import org.jumpmind.db.platform.DatabaseNamesConstants;
import org.jumpmind.db.platform.IDatabasePlatform;
import org.jumpmind.db.sql.JdbcUtils;
import org.jumpmind.symmetric.ISymmetricEngine;
import org.jumpmind.symmetric.db.ISymmetricDialect;
import org.jumpmind.symmetric.io.OracleBulkDatabaseWriter;
@@ -35,15 +34,12 @@
import org.jumpmind.symmetric.io.data.writer.ResolvedData;
import org.jumpmind.symmetric.io.data.writer.TransformWriter;
import org.jumpmind.symmetric.load.DefaultDataLoaderFactory;
import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor;

public class OracleBulkDataLoaderFactory extends DefaultDataLoaderFactory {

private ISymmetricEngine engine;
private NativeJdbcExtractor jdbcExtractor;

public OracleBulkDataLoaderFactory(ISymmetricEngine engine) {
this.jdbcExtractor = JdbcUtils.getNativeJdbcExtractory();
this.engine = engine;
this.parameterService = engine.getParameterService();
}
@@ -56,9 +52,7 @@ public IDataWriter getDataWriter(String sourceNodeId, ISymmetricDialect symmetri
TransformWriter transformWriter, List<IDatabaseWriterFilter> filters,
List<IDatabaseWriterErrorHandler> errorHandlers,
List<? extends Conflict> conflictSettings, List<ResolvedData> resolvedData) {
int maxRowsBeforeFlush = parameterService.getInt("oracle.bulk.load.max.rows.before.flush", 1000);
return new OracleBulkDatabaseWriter(symmetricDialect.getPlatform(), symmetricDialect.getTargetPlatform(), symmetricDialect.getTablePrefix(),
engine.getTablePrefix(), jdbcExtractor, maxRowsBeforeFlush,
return new OracleBulkDatabaseWriter(engine,
buildDatabaseWriterSettings(filters, errorHandlers, conflictSettings, resolvedData));
}

Oops, something went wrong.

0 comments on commit 4d3078f

Please sign in to comment.
You can’t perform that action at this time.