How to use --exclude-tables arguement


#1

I want to exclude some tables while using import-all-tables and using the below command but i end up getting an error;

sqoop import-all-tables
–connect jdbc:mysql://ms.itversity.com:3306/retail_db
–username retail_user
–password itversity
–exclude-table order_items_nopk
–warehouse-dir /user/mraheemabdul/sqoop_import/import_specific_tables

ERROR:
18/11/22 11:47:05 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.5.0-292
18/11/22 11:47:05 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
18/11/22 11:47:05 ERROR tool.BaseSqoopTool: Error parsing arguments for import-all-tables:
18/11/22 11:47:05 ERROR tool.BaseSqoopTool: Unrecognized argument: --exclude-table
18/11/22 11:47:05 ERROR tool.BaseSqoopTool: Unrecognized argument: order_items_nopk
18/11/22 11:47:05 ERROR tool.BaseSqoopTool: Unrecognized argument: --warehouse-dir
18/11/22 11:47:05 ERROR tool.BaseSqoopTool: Unrecognized argument: /user/mraheemabdul/sqoop_import/import_specific_tables


#2

There is typo in query. Try –exclude-tables order_items_nopk it works.


#3

Thank you AP for correcting me.

:slight_smile:


#4