Sqoop command and list all databases

 1. How to connect & list all databases in Sqoop:

Sqoop list-databases tool parses and executes the show databases query against the database server. Syntax: $ sqoop list-databases connection-args Example: $ sqoop list-databases --connect jdbc:mysql//localhost/ --username username --password password It will display the list of databases. 2. Common Arguments in Sqoop: 2.1. --connect jdbc-uri : JDBC connect string. 2.2. --connect-manager class-name: If you write your java program and tell sqoop how to connect database. Suppose you have a java program class like myConnect.java then you can use:- --connect-manager myConnect 2.3. --driver class-name: We can manually specify the jdbc driver. Jdbc:mysql is the jdbc driver. 2.4. --hadoop-home dir: Override the $HADOOP_HOME 2.5. -P: Read the password from console. 2.6. --username username: Set Authentic username. 2.7. --password password: Set Authentic password. 2.8. --verbose: Print more information while working. 2.10. --connection-param-file : Rather than writing username and password to (with the) import command, you can pass the filename which having the username and password. When connecting to a database using JDBC, you can optionally specify extra JDBC parameters via property file using the option –connection-param-file. 2.11. --target-dir: Name of directory instead of table name 2.12. --warehouse-dir: Directory name to store all the table directory. 2.13. --options-file: we can put import command and connection in a file and run it. 2.14. --help: Print the usage instructions

Comments

Popular posts from this blog

SQOOP file format

Why do we use $CONDITIONS in Apache Sqoop?

Sqoop where condition , Sqoop join two tables