import - Getting error while trying to connect to mysql server from sqoop -
i using cloudera cdh practising sqoop. when try connect cloudera mysql database through sqoop. getting error -
"use --table or --query import"
i followed instruction described in sqoop documentation.
http://sqoop.apache.org/docs/1.4.6/sqoopuserguide.html#_connecting_to_a_database_server
is there anyway connect mysql server sqoop other using import statement.
[cloudera@quickstart ~]$ sqoop import --connect \ > jdbc:mysql://quickstart.cloudera/retail_db \ > --username cloudera --password cloudera warning: /usr/lib/sqoop/../accumulo not exist! accumulo imports fail. please set $accumulo_home root of accumulo installation. 16/07/28 07:07:31 info sqoop.sqoop: running sqoop version: 1.4.6-cdh5.5.0 16/07/28 07:07:31 warn tool.basesqooptool: setting password on command-line insecure. consider using -p instead. --table or --query required import. (or use sqoop import-all-tables.)
sqoop import
used import data rdbms hdfs. import data need tell name of table or sql query. that's why getting error:
"use --table or --query import"
you want check if connection successful sqoop , don't want import data. can try other sqoop features
list databases
sqoop list-databases --connect jdbc:mysql://database.example.com/ -username user --password pass
list tables in database
sqoop list-tables --connect jdbc:mysql://database.example.com/testdb --username user --password pass
Comments
Post a Comment