Sqoop Tutorial
Sqoop Useful Resources
Selected Reading
- Sqoop - List Tables
- Sqoop - List Databases
- Sqoop - Eval
- Sqoop - Codegen
- Sqoop - Sqoop Job
- Sqoop - Export
- Sqoop - Import-All-Tables
- Sqoop - Import
- Sqoop - Installation
- Sqoop - Introduction
- Sqoop - Home
Sqoop Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Sqoop - List Tables
Sqoop - List Tables
This chapter describes how to pst out the tables of a particular database in MySQL database server using Sqoop. Sqoop pst-tables tool parses and executes the ‘SHOW TABLES’ query against a particular database. Thereafter, it psts out the present tables in a database.
Syntax
The following syntax is used for Sqoop pst-tables command.
$ sqoop pst-tables (generic-args) (pst-tables-args) $ sqoop-pst-tables (generic-args) (pst-tables-args)
Sample Query
The following command is used to pst all the tables in the userdb database of MySQL database server.
$ sqoop pst-tables --connect jdbc:mysql://localhost/userdb --username root
If the command is executes successfully, then it will display the pst of tables in the userdb database as follows.
... 13/05/31 16:45:58 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. emp emp_add emp_contactAdvertisements