sqoop - Sqoop List Tables - apache sqoop - sqoop tutorial - sqoop hadoop
How to list tables in sqoop?
- Sqoop list-tables tool parses and executes the ‘SHOW TABLES’ query against a particular database.
- Thereafter, it lists out the present tables in a database.
Purpose
List tables present in a database.
Syntax
Common arguments
Argument | Description |
---|---|
--connect <jdbc-uri> | Specify JDBC connect string |
--connect-manager <jdbc-uri> | Specify connection manager class to use |
--driver <class-name> | Manually specify JDBC driver class to use |
--hadoop-home <dir> | Override $HADOOP_HOME |
--help | Print usage instructions |
-P | Read password from console |
--password <password> | Set authentication password |
--username <username> | Set authentication username |
--verbose | Print more information while working |
--connection-param-file <filename> | Optional properties file that provides connection parameters |
- List tables available in the "corp" database:
Sample Query
- The following command is used to list all the tables in the userdb database of MySQL database server.
Output
- If the command is executes successfully, then it will display the list of tables in the userdb database as follows.