Wednesday, 18 May 2022

How to redirect sqoop command output to a file?

Syntax

{SQOOP_COMMAND} &> {LOG_FILE_NAME}

Example

sqoop-list-databases --connect "jdbc:mysql://quickstart.cloudera:3306" --username "root" --password "cloudera" &> out.log

[cloudera@quickstart Desktop]$ sqoop-list-databases --connect "jdbc:mysql://quickstart.cloudera:3306" --username "root" --password "cloudera" &> out.log
[cloudera@quickstart Desktop]$ 
[cloudera@quickstart Desktop]$ cat out.log 
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
22/04/01 02:07:36 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.13.0
22/04/01 02:07:36 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
22/04/01 02:07:36 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
information_schema
cm
firehose
hue
import_demo
metastore
mysql
nav
navms
oozie
retail_db
rman
sentry


 

Previous                                                    Next                                                    Home

No comments:

Post a Comment