English 中文(简体)
Sqoop - List Tables
  • 时间:2024-09-17

Sqoop - List Tables


Previous Page Next Page  

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_contact
Advertisements