We sometimes search for a column in the entire database, either to see how many tables a given column appears in or to see if a related field exists elsewhere. It’s possible in most databases, including MySQL, SQL Server, and others. To retrieve the needed information in Hive, however, we must search metadata tables.
Here is the query that helps in searching the column. As stated earlier, the metadata information from the Hive warehouse will be stored in MySQL, but it will not be reflected in the information schema. The DBS, TBLS and COLUMNS_V2 objects have such information.
SELECT
TBL_NAME,
COLUMN_NAME,
TYPE_NAME
FROM TBLS
LEFT JOIN COLUMNS_V2 on CD_ID = TBL_ID
WHERE COLUMN_NAME like ‘%column%’;
Hope you find this article helpful.
Please subscribe for more interesting updates.