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 Databases
Sqoop - List Databases
This chapter describes how to pst out the databases using Sqoop. Sqoop pst-databases tool parses and executes the ‘SHOW DATABASES’ query against the database server. Thereafter, it psts out the present databases on the server.
Syntax
The following syntax is used for Sqoop pst-databases command.
$ sqoop pst-databases (generic-args) (pst-databases-args) $ sqoop-pst-databases (generic-args) (pst-databases-args)
Sample Query
The following command is used to pst all the databases in the MySQL database server.
$ sqoop pst-databases --connect jdbc:mysql://localhost/ --username root
If the command executes successfully, then it will display the pst of databases in your MySQL database server as follows.
... 13/05/31 16:45:58 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. mysql test userdb dbAdvertisements