Package org.apache.sqoop.job.etl

Examples of org.apache.sqoop.job.etl.Initializer.initialize()


    jobConf.table.tableName = tableName;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "INSERT INTO " + executor.delimitIdentifier(tableName)
            + " VALUES (?,?,?)");
  }
View Full Code Here


    jobConf.table.columns = tableColumns;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "INSERT INTO " + executor.delimitIdentifier(tableName)
            + " (" + tableColumns + ") VALUES (?,?)");
  }
View Full Code Here

    jobConf.table.sql = tableSql;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "INSERT INTO " + executor.delimitIdentifier(tableName)
            + " VALUES (?,?,?)");
  }
View Full Code Here

    jobConf.table.tableName = tableName;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcImportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}",
        "ICOL,DCOL,VCOL",
View Full Code Here

    jobConf.table.columns = tableColumns;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcImportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "SELECT ICOL,VCOL FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}",
        tableColumns,
View Full Code Here

    jobConf.table.partitionColumn = "DCOL";

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcImportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}",
        "ICOL,DCOL,VCOL",
View Full Code Here

    jobConf.table.partitionColumn = "DCOL";

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcImportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
        "SELECT SQOOP_SUBQUERY_ALIAS.ICOL,SQOOP_SUBQUERY_ALIAS.VCOL FROM "
            + "(SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}) SQOOP_SUBQUERY_ALIAS",
View Full Code Here

      throw  new SqoopException(FrameworkError.FRAMEWORK_0006,
        "Can't create initializer instance: " + initializerClass.getName());
    }

    // Initialize submission from connector perspective
    initializer.initialize(request.getConnectorContext(),
      request.getConfigConnectorConnection(),
      request.getConfigConnectorJob());

    // Add job specific jars to
    request.addJars(initializer.getJars(request.getConnectorContext(),
View Full Code Here

    // Initializer context
    InitializerContext initializerContext = new InitializerContext(request.getConnectorContext());

    // Initialize submission from connector perspective
    initializer.initialize(initializerContext,
      request.getConfigConnectorConnection(),
      request.getConfigConnectorJob());

    // Add job specific jars to
    request.addJars(initializer.getJars(initializerContext,
View Full Code Here

    MutableContext context = new MutableMapContext();
    InitializerContext initializerContext = new InitializerContext(context);

    @SuppressWarnings("rawtypes")
    Initializer initializer = new GenericJdbcImportInitializer();
    initializer.initialize(initializerContext, connConf, jobConf);

    verifyResult(context,
        "SELECT * FROM " + executor.delimitIdentifier(schemalessTableName)
            + " WHERE ${CONDITIONS}",
        "ICOL,DCOL,VCOL",
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.