Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Now Live: Explore expert insights and technical deep dives on the new Cloudera Community BlogsRead the Announcement
Labels (1)
avatar
Contributor

Hive Compare Tables and Databases before and after Upgrades.

Run below script to collect all databases.

hive -e "show databases" | sed "s/ *$//g" |  sed "s/^ *//g" | sort 1>databaselist 

Run below script to collect all tables in database.

for dbname in `cat databaselist`  ; do hive -e "use ${dbname} ; show tables ;" | sed "s/ *$//g" |  sed "s/^ *//g" | sort  1> tablelist; done ; 

Execute Scripts above before upgrade and once after upgrade .

Simply do vimdiff afterwards to identify the difference if any.

Happy Migrating or Upgrading.

1,696 Views
0 Kudos
Version history
Last update:
‎01-20-2017 07:49 PM
Updated by:
Contributors