@Override
    public AbstractRdbSink genStreamSink(AbstractTargetTableInfo targetTableInfo) {
        RdbTableInfo rdbTableInfo = (RdbTableInfo) targetTableInfo;
        this.name = rdbTableInfo.getName();
        this.batchNum = rdbTableInfo.getBatchSize() == null ? batchNum : rdbTableInfo.getBatchSize();
        this.batchWaitInterval = rdbTableInfo.getBatchWaitInterval() == null ?
                batchWaitInterval : rdbTableInfo.getBatchWaitInterval();
        this.parallelism = rdbTableInfo.getParallelism() == null ? parallelism : rdbTableInfo.getParallelism();
        this.dbUrl = rdbTableInfo.getUrl();
        this.userName = rdbTableInfo.getUserName();
        this.password = rdbTableInfo.getPassword();
        this.tableName = rdbTableInfo.getTableName();
        this.registerTabName = rdbTableInfo.getName();
        this.primaryKeys = rdbTableInfo.getPrimaryKeys();
        this.dbType = rdbTableInfo.getType();
        this.schema = rdbTableInfo.getSchema();
        List<Class> fieldTypeArray = Arrays.asList(rdbTableInfo.getFieldClasses());
        this.sqlTypes = JDBCTypeConvertUtils.buildSqlTypes(fieldTypeArray);
        this.allReplace = rdbTableInfo.isAllReplace();
        this.updateMode = rdbTableInfo.getUpdateMode();
        this.fieldList = rdbTableInfo.getFieldList();
        this.fieldTypeList = rdbTableInfo.getFieldTypeList();
        this.fieldExtraInfoList = rdbTableInfo.getFieldExtraInfoList();
        this.errorLimit = rdbTableInfo.getErrorLimit();
        return this;
    }
Reason:
Date: 2018/11/27
Company: www.dtstack.com

@author maqi
rdb/rdb-sink/src/main/java/com/dtstack/flink/sql/sink/rdb/AbstractRdbSink.java