You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Naveen Gangam (JIRA)" <ji...@apache.org> on 2016/09/09 20:23:20 UTC

[jira] [Commented] (HIVE-14558) Add support for listing views similar to "show tables"

    [ https://issues.apache.org/jira/browse/HIVE-14558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15478146#comment-15478146 ] 

Naveen Gangam commented on HIVE-14558:
--------------------------------------

Based on some quick searches, appears most databases have some form of support for getting a list of views. I think it makes sense to support a "show views" command in hive, with a syntax similar to "show tables".  I am uploading a patch that will support commands like
{code}
show views; // list all views in the current database
show views 'test_*'; // list all views that start with "test_"
show views '*view'; // list all views that end in "view"
show views in <DB>; // list all views in database <DB>
show views from <DB>; // same as IN
show views in/from <DB> [LIKE] 'test_*'; // show views in database <DB> that start with "test_"
{code}

The syntax for this command is derived from SHOW TABLES command.

General syntax is 
SHOW VIEWS [IN/FROM DBNAME] [LIKE] [PATTERN]

> Add support for listing views similar to "show tables"
> ------------------------------------------------------
>
>                 Key: HIVE-14558
>                 URL: https://issues.apache.org/jira/browse/HIVE-14558
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 2.0.0
>            Reporter: Naveen Gangam
>            Assignee: Naveen Gangam
>
> Users have been asking for such feature where they can get a lists of views separately.
> So perhaps a syntax similar to "show tables" command?
> show views [in/from <dbName>] [<pattern>]
> Does it make sense to add such command? or is it not worth the effort?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)