Sqoop List Tables – Arguments and Examples
Keeping you updated with latest technology trends, Join DataFlair on Telegram
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.
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:
Java → Big Data Consultant, JDA
PeopleSoft → Big Data Architect, Hexaware
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|
|–help||Print usage instructions|
|–password-file||Set path for a file containing the authentication password|
|-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|
|–relaxed-isolation||Set 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
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.
Sqoop Eval and Sqoop Codegen