Tble being created in Default database


When i run the below sqoop script the table is being created in defaut database in HIVE. How can i specify to be created in a specific database.

sqoop import --connect “jdbc:mysql://nn01.itversity.com.:3306/retail_export” --username retail_dba --password itversity --table departments_raghu --hive-home /apps/hive/warehouse --hive-import --hive-table dept_null_replace --create-hive-table --null-string nvl --null-non-string -1 --m 1

Use --hive-database

–hive-database gnanaprakasam - here gnanaprakasam is hive database
–hive-database gnanaprakasam.departments - In this example we have given table name (departments) also, so we don’t need --hive-table separately.

Thanks @gnanaprakasam…yes i just saw a video was also added to resolve the same issue…awesome thanks again…:slight_smile: