Exclude parameter in SQOOP to exclude import tables

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 05 Jun, 2019
  • 0 Comments
  • 26 Secs Read

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://127.0.0.1:3306/test –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.

https://youtu.be/qlHYcUX-dRA