Skip to main content
ashish_inamdar
Gold ⭐️
August 11, 2020
Solved

No database is being detecting in import-hive.sh

Hi,

 

I am trying to import a hive table that has an MYSQL DB as metastore into Atlas by using import-hive.sh command but even when I explicitly pass the database name it fails to detect the same.

 

@Shelton,

Can you please suggest on this?

ashish_inamdar_0-1597118118370.png

 

ashish_inamdar_1-1597118215073.png

 

The above snippet shows AMBDB existing in the MySQL DB.

ashish_inamdar
Gold ⭐️
August 14, 2020

@Shelton,

 

We were trying to see if database and tables created in MySQL are imported through import-hive.sh. What we saw that import-hive.sh only imports the database and tables created through hive shell and not MySQL. Once we started creating the tables through the hive shell, the import-hive.sh started importing them and the same was seen in Atlas as well.

2 replies

Shelton
Gold ⭐️⭐️⭐️
August 11, 2020

@ashish_inamdar 

Have you enabled ranger hive plugin? If so then ensure the Atlas user has a Ranger policy that allows the user to correct database and tables permissions. Because once Ranger hive plugin has been enabled you MUST use Ranger for authorization.
Hope that helps

Translate
ashish_inamdar
ashish_inamdarAuthorAnswer
Gold ⭐️
August 14, 2020

@Shelton,

 

We were trying to see if database and tables created in MySQL are imported through import-hive.sh. What we saw that import-hive.sh only imports the database and tables created through hive shell and not MySQL. Once we started creating the tables through the hive shell, the import-hive.sh started importing them and the same was seen in Atlas as well.

Translate