类 ETLSyncBase

java.lang.Object
com.sh.wf.etl.sync.ETLSyncBase
所有已实现的接口:
ETLSync_I
直接已知子类:
ETLSyncFullData, ETLSyncIncrement, ETLSyncIncrementDataByORAROWSCN, ETLSyncPKData

public abstract class ETLSyncBase extends Object implements ETLSync_I

Description: 同步基类

Title:首亨软件 - TSS/CRM等

从以下版本开始:
2017年8月24日
  • 字段详细资料

    • etlData

      protected ETLData etlData
    • fromSDBData

      protected SDBData fromSDBData
    • toSDBData

      protected SDBData toSDBData
    • fromSource

      protected ETLSource fromSource
    • toSource

      protected ETLSource toSource
    • lineList

      protected List<ArrowLine> lineList
    • sourceTableTime

      protected Timestamp sourceTableTime
    • lastPkValue

      protected String lastPkValue
    • isSqlServerTimestamp

      protected boolean isSqlServerTimestamp
    • hasRepeatWhere

      protected boolean hasRepeatWhere
    • pkLineList

      protected List<ArrowLine> pkLineList
    • lastPageNo

      protected int lastPageNo
  • 构造器详细资料

    • ETLSyncBase

      public ETLSyncBase()
  • 方法详细资料

    • sync

      public abstract void sync(ETLContext etlContext) throws Exception
      各种条件下需要实现的同步方式
      参数:
      etlContext - ETLContext
      抛出:
      Exception - 异常
    • initCommon

      protected boolean initCommon(ETLContext etlContext)
      初始化参数
      参数:
      etlContext - ETLContext
    • syncData

      public void syncData(ETLContext etlContext)
      从接口复制的说明: ETLSync_I
      同步数据
      指定者:
      syncData 在接口中 ETLSync_I
      参数:
      etlContext - ETLContext
    • generateSQL

      protected String[] generateSQL(ETLContext etlContext, boolean hasTimestampCol, DataCenter toDc)
      生成相应的SQL
      参数:
      etlContext -
      hasTimestampCol - true 自动检测时间戳列 false 不检查
      返回:
    • setColType

      protected void setColType(String[] colsType, int i, ArrowLine line, List<ETLColumnInfo> columnList, Datastore ds, Datastore toDs)
    • checkAndSetObj

      protected Object checkAndSetObj(ETLContext etlContext, RowInfo rowInfo, ArrowLine line, Datastore ds, ETLColumnInfo columnInfo)
      转换数据格式
      参数:
      etlContext -
      rowInfo -
      line -
      返回:
    • checkToSourceExists

      protected boolean checkToSourceExists(ETLContext etlContext, Datastore fromDs, RowInfo rowInfo)
      判断目标表中的记录是否存在,如果存在则删除重新添加
      参数:
      etlContext -
      fromDs -
      返回:
    • everyUpdateLog

      protected boolean everyUpdateLog(ETLContext etlContext, int num1, int errorNum)
    • everyUpdateLog

      protected boolean everyUpdateLog(ETLContext etlContext, int num1, int errorNum, int pageNo)
      更新日志
      参数:
      etlContext -
      num1 -
      errorNum -
      返回:
    • updateMainLog

      protected boolean updateMainLog(ETLContext etlContext, String isRun)
      记录总表
      参数:
      etlContext -
      isRun -
      返回:
    • insertErrorLog

      protected void insertErrorLog(ETLContext etlContext, String errorData, String errorMsg)
      记录错误日志
      参数:
      etlContext -
      errorData -
      errorMsg -
    • getfromTableColByToTableCol

      public String getfromTableColByToTableCol(ETLContext etlContext, String toTableCol)