Cheat Code
SELECT
d.DB_ID
,d.NAME
,t.TBL_NAME
,c.COLUMN_NAME
,c.INTEGER_IDX
FROM tbls t
INNER JOIN SDS s
ON t.SD_ID = s.SD_ID
INNER JOIN COLUMNS_V2 c
ON c.CD_ID = s.CD_ID
INNER JOIN DBS d
ON d.DB_ID = t.DB_ID
WHERE d.NAME = 'mydb'
ORDER BY 2, 3, 5
So we have Hive, and we love Hive.
There are so much good about Hive. Enough Hive!
Anyway, on one beautiful morning somebody came to me and said “Hey bro, this table on hive is broken. The field name and content doesn’t seems matching?”. I said “WHAT!?”
So after long drama, we found our source system changed something without telling us. Welcome to Reality Bruh….
Anyhow I don’t like to EYEBALL one-by-one, and there is no “information_schema” on our older hive cluster. Luckily we have access to hive metadata which is hosted on Azure SQL…
Using the cheat code above allow me to retrieve all fields for all tables on hive, and do VLOOKUP magic to found what changed.
Love it!














