Apache Sqoop List Tables tool is used to show the list of tables present in a database. It executes the “SHOW TABLES” command in the background for a database which results in all table lists present in that database.

List Tables Syntax

Below is the syntax mentioned for Sqoop List Tables.

sqoop list-tables (generic-aruguments) (list-tables-aruguments)


List Tables Example

We will use the (list-tables) tool to list all tables present in the “userdata” database of MySQL.

Command:

cloudduggu@ubuntu:~/sqoop/bin$ sqoop list-tables --connect jdbc:mysql://localhost/userdata?serverTimezone=UTC --username root --password cloudduggu

Output:

From the output, we can see all tables are listed for the "userdata" database.

sqoop all tables list