最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sql - How to check if given table is view in Impala - Stack Overflow

programmeradmin2浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论