I am working with Impala JDBC and trying to list only views from a database. However, I couldn't find a query that returns only views.
SHOW TABLES IN dbname;
returns both tables and views combined.DESCRIBE dbname.tableName;
does not indicate whether the object is a view or a table.
When I run:
DESCRIBE impaladb.shantanu_view_6test;
I get:
name | type | comment
-------+--------------+---------
id | int |
name | varchar(300) |
And when I run:
SHOW TABLES IN impaladb;
I get:
name
------------------------------
6test
shantanu_view_6test
Both tables and views are listed together, and DESCRIBE
does not indicate which is a view.
Is there a way to list only views in an Impala database? Or is there a query to distinguish between tables and views?