Search in sources :

Example 1 with OracleDialect

use of com.alibaba.otter.node.etl.common.db.dialect.oracle.OracleDialect in project otter by alibaba.

the class OperationInterceptorFactory method getIntercetptor.

private LoadInterceptor[] getIntercetptor(DbLoadContext context, List<EventData> currentData) {
    if (currentData == null || currentData.size() == 0) {
        return empty;
    }
    DataMedia dataMedia = ConfigHelper.findDataMedia(context.getPipeline(), currentData.get(0).getTableId());
    DbDialect dbDialect = dbDialectFactory.getDbDialect(context.getIdentity().getPipelineId(), (DbMediaSource) dataMedia.getSource());
    if (dbDialect instanceof MysqlDialect) {
        return mysqlInterceptors;
    } else if (dbDialect instanceof OracleDialect) {
        return oracleInterceptors;
    } else {
        return empty;
    }
}
Also used : MysqlDialect(com.alibaba.otter.node.etl.common.db.dialect.mysql.MysqlDialect) OracleDialect(com.alibaba.otter.node.etl.common.db.dialect.oracle.OracleDialect) DbDialect(com.alibaba.otter.node.etl.common.db.dialect.DbDialect) DataMedia(com.alibaba.otter.shared.common.model.config.data.DataMedia)

Aggregations

DbDialect (com.alibaba.otter.node.etl.common.db.dialect.DbDialect)1 MysqlDialect (com.alibaba.otter.node.etl.common.db.dialect.mysql.MysqlDialect)1 OracleDialect (com.alibaba.otter.node.etl.common.db.dialect.oracle.OracleDialect)1 DataMedia (com.alibaba.otter.shared.common.model.config.data.DataMedia)1