Thursday 7 September 2017

10)Sqoop Tool7: sqoop-eval:

Sqoop Tool7: sqoop-eval:
The eval tool is provided for evaluation purpose only,
  • It allows users to quickly run simple SQL queries against a database. 
  • You can use it to verify database connection from within the Sqoop or to test simple queries
Note:
The eval tool ; results are printed to the console.
Also, it is not suggested to use at production workflows

Syntax:
$ sqoop eval (generic-args) (eval-args)
or
$ sqoop-eval (generic-args) (eval-args)
Following arguments list for eval tool:
  1. Common arguments
  2. SQL evaluation arguments 
1)Common arguments:
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.

2)SQL evaluation arguments:
Argument Description
-e,--query <statement>
Execute statement in SQL

Command: simple select statement
mano@Mano:~$ sqoop-eval --connect jdbc:mysql://localhost/sqoop_test --username root --password root --query 'select * from students'
 
we can also perform the insert,delete,update statements etc., using eval tool
Please follow the link for further ==>

1 comment:

Fundamentals of Python programming

Fundamentals of Python programming: Following below are the fundamental constructs of Python programming: Python Data types Python...