Sqoop List Tables – Arguments and Examples

1. Objective

A tool which executes the ‘SHOW TABLES’ query against a particular database. Basically, that we called Sqoop list tables. However, there are much more to know about Sqoop list tables. So this document contains the whole concept of list tables in Sqoop. Moreover, we will learn the purpose and syntax of Sqoop list tables. Afterward, we will see some of Sqoop list-tables arguments and examples to understand it well.

sqoop list tables

Sqoop list tables – Introduction

2. Introduction to Sqoop List Tables

  • A tool which parses as well as executes the ‘SHOW TABLES’ query against a particular database.
  • Also, it lists out the tables in a database.

Get the most demanding skills of IT Industry - Learn Hadoop

3. Sqoop List Tables Purpose and Syntax

Basically, the main purpose of sqoop-list-tables is list tables present in a database.


$ sqoop list-tables (generic-args) (list-tables-args)
$ sqoop-list-tables (generic-args) (list-tables-args)
However, the Sqoop list-tables arguments can be entered in any order with respect to one another but the Hadoop generic arguments must precede any list-tables arguments only.

5. Arguments in Sqoop List Tables

Table.1  Common arguments

–connect <jdbc-uri>Specify JDBC connect string
–connection-manager <class-name>Specify connection manager class to use
–driver <class-name>Manually specify JDBC driver class to use
–hadoop-mapred-home <dir>Override $HADOOP_MAPRED_HOME
–helpPrint usage instructions
–password-fileSet path for a file containing the authentication password
-PRead password from console
–password <password>Set authentication password
–username <username>Set authentication username
–verbosePrint more information while working
–connection-param-file <filename>Optional properties file that provides connection parameters
–relaxed-isolationSet connection transaction isolation to read uncommitted for the mappers.
Hadoop Quiz

6. Sqoop List Tables Example

Basically, all the list tables available in the “corp” database:
$ sqoop list-tables –connect jdbc:mysql://database.example.com/corp
Although, list tables command with common arguments fetches only “public” schema, in case of postgresql. Basically, we use –schema argument to list tables of the particular schema for custom schema. For Example
$ sqoop list-tables –connect jdbc:postgresql://localhost/corp  –username name -P — –schema payrolldept

7. Conclusion

As a result, we have seen the whole concept of Sqoop list tables. Also, we have learned syntax and purpose of a list- tables in sqoop. Moreover, we have seen its arguments as well as examples to understand. However, if you feel any query please ask in the comment section.Then we will definitely get back to you. 
See also-
Sqoop Eval and Sqoop Codegen
For reference

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.