[ https://issues.apache.org/jira/browse/HIVE-18373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318210#comment-16318210 ]
Siddhant Saraf edited comment on HIVE-18373 at 1/9/18 10:29 AM: ---------------------------------------------------------------- [~minions] yes, as [~thejas] correctly points out, searching for tables within a database is already implemented. I would like something similar to search for columns within a table. [~thejas] As for the syntax, I'm not very sure. Currently, to list _all_ columns in a table, one can already do: {code:java} -- list all columns (already implemented): hive> show columns in my_table; {code} Maybe we can extend the aforementioned tablename filtering syntax to filter the column names within this list of all columns? How does the following feel: {code:java} -- list only columns containing the string 'abc' (suggested syntax): hive> show columns '*abc*' in my_table; {code} However, is anyone aware how it is done in other database systems, like PostgreSQL? It would be best to copy the syntax from already established ones. was (Author: siddhantsaraf): [~minions] yes, as [~thejas] correctly points out, searching for tables within a database is already implemented. I would like something similar to search for columns within a table. [~thejas] As for the syntax, I'm not very sure. Currently, to list _all_ columns in a table, one can already do: {code:java} -- list all columns (already implemented): hive> show columns in my_table; {code} Maybe we can extend the afromentioned tablename filtering syntax to filter the column names within this list of all columns? How does the following feel: {code:java} -- list only columns containing the string 'abc' (suggested syntax): hive> show columns '*abc*' in my_table; {code} However, is anyone aware how it is done in other database systems, like PostgreSQL? It would be best to copy the syntax from already established ones. > Make it easier to search for column name in a table > --------------------------------------------------- > > Key: HIVE-18373 > URL: https://issues.apache.org/jira/browse/HIVE-18373 > Project: Hive > Issue Type: New Feature > Reporter: Siddhant Saraf > Assignee: Madhudeep Petwal > Priority: Minor > > Within a database, to filter for tables with the string 'abc' in its name, I > can use something like: > {code:java} > hive> use my_database; > hive> show tables '*abc*'; > {code} > It would be great if I can do something similar to search within the list of > columns in a table. > I have a table with around 3200 columns. Searching for the column of interest > is an onerous task after doing a {{describe}} on it. -- This message was sent by Atlassian JIRA (v6.4.14#64029)