Sqoop Tool9: sqoop-list-tables:
Using list-tables tool, to list tables present in a database.
Syntax:
Command:
mano@Mano:~$ sqoop-list-tables --connect jdbc:mysql://localhost/sqoop_test --username root --password root
Note:
In case of postgresql, list tables command with common arguments fetches only "public" schema. For custom schema, use --schema argument to list tables of particular schema
Syntax:
$ sqoop-list-tables --connect jdbc:postgresql://localhost/db --username name -P -- --schema sch_name
Using list-tables tool, to list tables present in a database.
Syntax:
$ sqoop list-tables (generic-args) (list-tables-args)Common arguments:
or
$ sqoop-list-tables (generic-args) (list-tables-args)
Argument
|
Description
|
--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.
|
Command:
mano@Mano:~$ sqoop-list-tables --connect jdbc:mysql://localhost/sqoop_test --username root --password root
Note:
In case of postgresql, list tables command with common arguments fetches only "public" schema. For custom schema, use --schema argument to list tables of particular schema
Syntax:
$ sqoop-list-tables --connect jdbc:postgresql://localhost/db --username name -P -- --schema sch_name
No comments:
Post a Comment