Thursday, June 27, 2019

Sqoop - Eval


Eval is normally used to run simple sql queries against the database server.It will also preview the result on the console level.Eval can be used to evaluate any type of query like DDL/DML.

EVAL is only to check the database connection and also to preview the small set of data.It will provide the user to test the simple queries.

Sqoop Syntax :-

sqoop --eval {generic-args} {eval args}

Generic 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.


Eval Args :-

e ,query Execute statement in SQL.

query examples :-

sqoop eval \
–connect jdbc:mysql://localhost/test \
–username root \
–query “SELECT * FROM sqoop_test ”





1 comment:

Delta Lake - Time Travel

  Time Travel allows you to query, restore, or compare data from a previous version of a Delta table. Delta Lake automatically keeps tra...