Examples of findTable()


Examples of com.alibaba.otter.node.etl.common.db.dialect.DbDialect.findTable()

                Thread.currentThread().setName(String.format(WORKER_NAME_FORMAT, pipeline.getId(), pipeline.getName()));
                // 获取数据表信息
                DataMedia dataMedia = ConfigHelper.findDataMedia(pipeline, eventData.getTableId());
                DbDialect dbDialect = dbDialectFactory.getDbDialect(pipeline.getId(),
                                                                    (DbMediaSource) dataMedia.getSource());
                Table table = dbDialect.findTable(eventData.getSchemaName(), eventData.getTableName());
                TableData keyTableData = buildTableData(table, eventData.getKeys());

                // oracle类型特殊处理下
                if (dbDialect instanceof OracleDialect) {
                    keyTableData.columnTypes = getOraclePkTypes(table, keyTableData.columnNames);
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.db.dialect.DbDialect.findTable()

                                                              // meta信息,如果同构数据库,完全没必要反查
            // 获取目标库的表信息
            DbDialect dbDialect = dbDialectFactory.getDbDialect(dataMediaPair.getPipelineId(),
                (DbMediaSource) dataMedia.getSource());

            Table table = dbDialect.findTable(result.getSchemaName(), result.getTableName());
            tableHolder = new TableInfoHolder(table, useTableTransform, enableCompatibleMissColumn);
        }

        // 处理column转化
        List<EventColumn> otherColumns = translateColumns(result,
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.db.dialect.DbDialect.findTable()

                DbDialect dbDialect = dbDialectFactory.getDbDialect(dataMediaPair.getPipelineId(), dbMediaSource);
                String schemaName = tableHolder.getTable().getSchema();
                if (StringUtils.isEmpty(schemaName)) {
                    schemaName = tableHolder.getTable().getCatalog();
                }
                Table table = dbDialect.findTable(schemaName, tableHolder.getTable().getName(), false); // 强制反查一次,并放入cache

                tableHolder.setTable(table);
                matchDbColumn = getMatchColumn(tableHolder.getTable().getColumns(), tcolumn.getColumnName());
                if (matchDbColumn == null) {
                    if (canColumnsNotExist) {
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.db.dialect.DbDialect.findTable()

                        // 重新构建新的业务主键字段
                        EventColumn pkDataColumn = getMatchColumn(eventData.getColumns(), PK_DATA);
                        String pkData = pkDataColumn.getColumnValue();
                        String[] pks = StringUtils.split(pkData, PK_SPLIT);

                        Table table = dbDialect.findTable(eventData.getSchemaName(), eventData.getTableName());
                        List<EventColumn> newColumns = new ArrayList<EventColumn>();
                        Column[] primaryKeyColumns = table.getPrimaryKeyColumns();
                        if (primaryKeyColumns.length > pks.length) {
                            throw new ExtractException("data pk column size not match , data:" + eventData.toString());
                        }
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.db.dialect.DbDialect.findTable()

            if (useTableTransform || dataMedia.getSource().getType().isOracle()) {// oracle需要反查一次meta
                // 如果设置了需要进行table meta转化,则反查一下table信息
                // 比如oracle erosa解析时可能使用了非物理主键,需要直接使用,信任erosa的信息
                DbDialect dbDialect = dbDialectFactory.getDbDialect(pipeline.getId(),
                    (DbMediaSource) dataMedia.getSource());
                table = dbDialect.findTable(eventData.getSchemaName(), eventData.getTableName());// 查询一下meta信息
                if (table == null) {
                    logger.warn("find table[{}.{}] is null , may be drop table.",
                        eventData.getSchemaName(),
                        eventData.getTableName());
                }
View Full Code Here

Examples of nexj.core.meta.persistence.sql.RelationalSchema.findTable()

      DropTableStep step = new DropTableStep();

      step.setName(m_singlePKColTableStep.getName());
      schema = upgrade(step, schema, null);
      assertNull(schema.findTable(m_singlePKColTableStep.getName()));
   }

   public void testDropUpgradeSchema()
   {
      SQLAppender origAppender = m_manager.getSQLAppender();
View Full Code Here

Examples of nexj.core.meta.persistence.sql.RelationalSchema.findTable()

      RenameTableStep step = new RenameTableStep();
      step.setOldName(table.getName());
      step.setNewName("B");
      schema = upgrade(step, schema, null);

      assertNull(schema.findTable(m_singlePKColTableStep.getName()));

      table = schema.getTable(schema.getPrefix() + "b");

      assertNotNull(table);
      assertEquals(1, table.getColumnCount());
View Full Code Here

Examples of org.apache.ddlutils.model.Database.findTable()

      System.out.println(platform.getAlterTablesSql(connection, database));
     
      // this will perform the database changes
      CreationParameters cp = new CreationParameters();
      // to search, it requires MyISAM
      cp.addParameter(database.findTable("discoveries_search"), "ENGINE", "MyISAM");
      cp.addParameter(database.findTable("discoveries_search2"), "ENGINE", "MyISAM");

      platform.alterTables(connection, database, cp, true);
     
 
View Full Code Here

Examples of org.apache.ddlutils.model.Database.findTable()

     
      // this will perform the database changes
      CreationParameters cp = new CreationParameters();
      // to search, it requires MyISAM
      cp.addParameter(database.findTable("discoveries_search"), "ENGINE", "MyISAM");
      cp.addParameter(database.findTable("discoveries_search2"), "ENGINE", "MyISAM");

      platform.alterTables(connection, database, cp, true);
     
 
      connection.close();
View Full Code Here

Examples of org.apache.ddlutils.model.Database.findTable()

      System.out.println(platform.getAlterTablesSql(connection, database));
     
      // this will perform the database changes
      CreationParameters cp = new CreationParameters();
      // to search, it requires MyISAM
      cp.addParameter(database.findTable("discoveries_search"), "ENGINE", "MyISAM");
      cp.addParameter(database.findTable("discoveries_search2"), "ENGINE", "MyISAM");

      platform.alterTables(connection, database, cp, true);
       
      connection.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.