eval
The eval
tool allows you to quickly run simple SQL queries against a database; results are printed to the console.
This allows users to preview their import queries to ensure they import the data they expect.
The eval
tool is provided for evaluation purpose only.
You can use it to verify database connection from within the Sqoop or to test simple queries.
It is not supposed to be used in the production workflows.
The tool usage is shown below.
$ sqoop eval <generic-args> <eval-args>
$ sqoop-eval <generic-args> <eval-args>
Although the Hadoop generic arguments must precede any eval
arguments, the eval
arguments can be entered in any order with respect to one another.
--connect <jdbc-uri> |
Specifies the JDBC connection string |
--connection-manager <class-name> |
Specifies the connection manager class to use |
--connection-param-file <filename> |
Specifies optional properties file that provides connection parameters |
--driver <class-name> |
Specifies the JDBC driver class to use |
--hadoop-mapred-home <dir> |
Overrides |
--help |
Prints usage instructions |
--password-file |
Sets the path to a file containing the authentication password |
-P |
Reads the password from the console |
--password <password> |
Specifies the authentication password |
--username <username> |
Specifies the authentication username |
--verbose |
Prints more information while working |
--relaxed-isolation |
Instructs Sqoop to use the read-uncommitted isolation level |
-e,--query <statement> |
Executes the SQL |