Hive query metadata to get table and field structure annotations

--hive query metadata to get table and field structure annotations

SELECT DBS.DB_ID,DBS.NAME,TBL_ID,TBL_NAME,COLUMNS_V2.CD_ID,COLUMNS_V2.COLUMN_NAME,COLUMNS_V2.TYPE_NAME,COLUMNS_V2.COMMENT,INTEGER_IDX
from TBLS 
LEFT join DBS on TBLS.DB_ID=DBS.DB_ID 
left join SDS on TBLS.SD_ID=SDS.SD_ID
LEFT join COLUMNS_V2 on SDS.CD_ID=COLUMNS_V2.CD_ID
where TBLS.TBL_NAME='rpt_msg_data_daily'
ORDER BY INTEGER_IDX

Guess you like

Origin blog.csdn.net/cakecc2008/article/details/105068552