Exclude parameter in SQOOP to exclude import tables

STEP 1. Check the no of tables in mysql database.

mysql> show tables;


| Tables_in_test |


| company |

| student |

| transactions |


3 rows in set (0.00 sec)

3 rows in set (0.00 sec)

STEP 2. Use import-all-tables command to import all tables from test database excluding company table.

sqoop import-all-tables –connect jdbc:mysql:// –username root –password cloudera –m 1 -warehouse-dir /user/cloudera/excludetables –exclude-tables company

above command will import all the tables from test database but not company. use , if you are looking for multiple tables to exclude.

Share and Enjoy !

0 0

Leave a Comment

Your email address will not be published. Required fields are marked *