Created 10-20-2016 07:21 PM
Do any one help me to write Sqoop script with Java API ?
Created 10-20-2016 07:44 PM
Created 10-20-2016 07:44 PM
Take a look here to start with.
Created 10-20-2016 08:05 PM
Here is an example of using the SQOOP API
https://gist.github.com/umbertogriffo/5ddb75bda34a99a427ff
Just use NIFI, why write a whole Java app?
Or just schedule SQOOP with OOZIE
Created 03-03-2017 05:31 AM
Issue in Sqoop : Oracle database to hdfs 17/03/02 19:44:28 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time. 17/03/02 19:44:28 INFO manager.SqlManager: Using default fetchSize of 1000 17/03/02 19:44:28 INFO tool.CodeGenTool: Beginning code generation 17/03/02 19:44:40 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM ABCSCHEMA.ABCTABLE AS t WHERE 1=0 17/03/02 19:44:40 ERROR manager.SqlManager: Error executing statement: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) Solution : 1.Table name should be capital : SqoopOptions.setTableName("ABCSCHEMA.ABCTABLE"); String[] cols={"E_DATE","E_CATEGORY","E_COMPUTER","U_NAME","IPADDRESS","D_NAME","R_INSERT_DATE"}; SqoopOptions.setColumns(cols); SqoopOptions.setWhereClause("R_INSERT_DATE >=to_date('31-12-1900','DD-MM-YYYY')"); 2. Dont Specify Driver name in your program using below commands (refer this : https://issues.apache.org/jira/browse/SQOOP-457 ) So below lines not required in your program : // SqoopOptions.setDriverClassName(DriverDomain); //SqoopOptions.setConnManagerClassName("org.apache.sqoop.manager.GenericJdbcManager");
Created 03-03-2017 05:32 AM
Provided solution for "java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended"