‘sqoop-list-tables’ command is used to print all the tables in a database.
Syntax
sqoop-list-tables --connect "{jdbc_connection_url}" --username "{user_name}" --password "{password}"
Example
sqoop-list-tables --connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" --username "retail_dba" --password "cloudera"
Above snippet print all the tables in a database retail_db.
$sqoop-list-tables --connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" --username "retail_dba" --password "cloudera"
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
22/03/31 03:50:23 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.13.0
22/03/31 03:50:23 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
22/03/31 03:50:23 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
categories
customers
departments
order_items
orders
products
Previous Next Home
No comments:
Post a Comment