Support Questions

Find answers, ask questions, and share your expertise

ParseException while trying to execute a "SHOW VIEWS" command

avatar
Contributor

Hi,

I don't understand what is happenning. I am desperately trying to make work a simple "SHOW VIEWS" command and I always get a ParseException error (cannot recognize input near 'show' 'views').

I believe the command must not return an error even if no view were created ? Anyway, I created a view juste in case.

Here are the command I tried and that returned me ParseException errors:

SHOW VIEWS;

SHOW VIEWS IN mydatabase;

SHOW VIEWS FROM mydatabase;

Very simple ones. I am running a 2.4 version of Hive so I believe it is not a version issue.

Thanks in advance !

Sylvain.

1 ACCEPTED SOLUTION

avatar
Super Guru

@dvt isoft

This has been introduced in Hive 2.2.0 via HIVE-14558. Your HDP 2.4 does not have that version.

+++

Could you please vote and accept this response and also the other one regarding French characters? Even they don't resolve your immediate expectation that is the state of the software you use for test. It is still the best answer. Thanks.

View solution in original post

3 REPLIES 3

avatar

There is no "show views" command in Hive. You use "show tables" and it should list the views as well. However there is an open Apache Hive issue HIVE-1010, that will implement INFORMATION_SCHEMA in Hive which will make it possible to query views exclusively.

avatar
Super Guru

@dvt isoft

This has been introduced in Hive 2.2.0 via HIVE-14558. Your HDP 2.4 does not have that version.

+++

Could you please vote and accept this response and also the other one regarding French characters? Even they don't resolve your immediate expectation that is the state of the software you use for test. It is still the best answer. Thanks.

avatar

Thanks, useful to know that its finally been implemented.