sqoop - Sqoop List Database - apache sqoop - sqoop tutorial - sqoop hadoop
How to List the Database in Sqoop?
- Sqoop list-databases tool parses and executes the ‘SHOW DATABASES’ query against the database server.
- Thereafter, it lists out the present databases on the server.
Purpose
List database schemas present on a server.
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 |
Syntax
Sqoop related tags : sqoop import , sqoop interview questions , sqoop export , sqoop commands , sqoop user guide , sqoop documentation
Sample Query
The following command is used to list all the databases in the MySQL database server.
Output
If the command executes successfully, then it will display the list of databases in your MySQL database server as follows.