Sqoop List Tables – Arguments and Examples

Keeping you updated with latest technology trends, Join DataFlair on Telegram

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.
If these professionals can make a switch to Big Data, so can you:
Rahul Doddamani Story - DataFlair
Rahul Doddamani
Java → Big Data Consultant, JDA
Follow on
Mritunjay Singh Success Story - DataFlair
Mritunjay Singh
PeopleSoft → Big Data Architect, Hexaware
Follow on
Rahul Doddamani Success Story - DataFlair
Rahul Doddamani
Big Data Consultant, JDA
Follow on
I got placed, scored 100% hike, and transformed my career with DataFlair
Enroll now
Richa Tandon Success Story - DataFlair
Richa Tandon
Support → Big Data Engineer, IBM
Follow on
DataFlair Web Services
You could be next!
Enroll now

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.

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.