如何搜索具有给定列名称的所有表并返回哪些表在Hadoop / Hive中具有此列名? [英] How can you search for all tables with a given column name and return which tables have this column name in Hadoop/Hive?

查看:426
本文介绍了如何搜索具有给定列名称的所有表并返回哪些表在Hadoop / Hive中具有此列名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


解决方案

截至目前,我正在寻找在HDFS / Hive中包含给定列名的所有表?猜猜有没有直接的方法来找到一个表中有特定的列蜂窝。

但我建议使用蜂房Metast为此目的,如果它可以满足您的如果您的配置单元Metastore是在mysql中配置的,那么有两个表TBLS--其中包含您配置单元中的所有表,并且COLUMNS_V2具有列名所有表格。

因此,基本上加入这两个表来查找列名称的表。



希望这帮助。


I am looking to find all tables that contain a given column name in HDFS/Hive?

解决方案

As of now i guess there is no direct way to find a table which has the particular column in hive.

But i would suggest using the hive metastore for this purpose , if it would suffice your requirement.

In case if your hive metastore is configured in mysql , then there are 2 tables TBLS - which has all the tables in your hive and COLUMNS_V2 which has the column names of all tables.

So basically join theses 2 tables for finding the table with column name .

Hope this helps.

这篇关于如何搜索具有给定列名称的所有表并返回哪些表在Hadoop / Hive中具有此列名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆