0

I am looking for the exporting db table content into the csv file. For that I found that Apache Sqoop does it very fast. and also import into hdfs.

I am successfully able import to hdfs using Apache Sqoop for Oracle 11g. Now when I tried for Sybase database. It's not completing the task and situation like nothing happening.

command using...

                "import"
                , "--driver", "com.sybase.jdbc4.jdbc.SybDriver"
                , "--connect"
                , "jdbc:sybase:Tds:192.168.1.151:5002?ServiceName=test1"
                , "--username", "tejkiran", "--password", "passw0rd"
                , "--table", "PIN"
                , "-m", "1"
                , "--target-dir", "/tmp/HELLO/tej01"

Log Details...

16:51:38.249 [main] WARN  org.apache.sqoop.tool.SqoopTool - 
$SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
16:51:38.442 [main] DEBUG com.cloudera.sqoop.SqoopOptions - Generated nonce dir: /tmp/sqoop-hduser/compile/7c374682d26b0ab8b800a1bbbbccd726
16:51:38.547 [main] WARN  org.apache.sqoop.tool.BaseSqoopTool - Setting your password on the command-line is insecure. Consider using -P instead.
16:51:38.586 [main] WARN  org.apache.sqoop.ConnFactory - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
16:51:38.750 [main] DEBUG org.apache.sqoop.ConnFactory - Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
16:51:38.751 [main] DEBUG org.apache.sqoop.ConnFactory - Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
16:51:38.803 [main] INFO  org.apache.sqoop.manager.SqlManager - Using default fetchSize of 1000
16:51:38.803 [main] DEBUG org.apache.sqoop.ConnFactory - Instantiated ConnManager org.apache.sqoop.manager.GenericJdbcManager@50246923
16:51:38.803 [main] INFO  org.apache.sqoop.tool.CodeGenTool - Beginning code generation
16:51:40.279 [main] DEBUG org.apache.sqoop.manager.SqlManager - No connection paramenters specified. Using regular API for making connection.
16:51:41.147 [main] DEBUG org.apache.sqoop.manager.SqlManager - Using fetchSize for next query: 1000
16:51:41.164 [main] INFO  org.apache.sqoop.manager.SqlManager - Executing SQL statement: SELECT t.* FROM PIN AS t WHERE 1=0

After this statement there is not log updated and

Tej Kiran
  • 2,218
  • 5
  • 21
  • 42
  • Not sure if this is what you are trying to do, but the last line will only pull headers from table PIN. Also try without the 'AS' `FROM PIN t` may not make a difference, but worth a try. – Mike Gardner Jan 14 '16 at 21:02
  • Thanks for reply. I am not giving query for import command. I am just specify the table name and internally sqoop is executing this query. – Tej Kiran Jan 15 '16 at 04:18

0 Answers0