Hive - How to see the table created in metastore?

后端 未结 4 1476
广开言路
广开言路 2020-12-10 06:30

Here is our setup - We have Hive that uses MySQL on another machine as a metastore. I can start the Hive command line shell and create a table and describe it. But when I lo

4条回答
  •  攒了一身酷
    2020-12-10 07:03

    Another useful query if you want to search what other tables a particular column belongs to:

    SELECT c.column_name, tbl_name, c.comment, c.type_name, c.integer_idx,
     tbl_id, create_time, owner, retention, t.sd_id, tbl_type, input_format, is_compressed, location,
     num_buckets, output_format, serde_id, s.cd_id
    FROM TBLS t, SDS s, COLUMNS_V2 c
    -- WHERE tbl_name = 'my_table'
    WHERE t.SD_ID = s.SD_ID
    AND s.cd_id = c.cd_id
    AND c.column_name = 'my_col'
    order by create_time
    

提交回复
热议问题