如何列出到目前为止正在使用或创建的所有配置单元数据库? [英] How to list all hive databases being in use or created so far?
问题描述
类似于SHOW TABLES
命令,我们是否有任何这样的命令可以列出到目前为止创建的所有数据库?
Similar to SHOW TABLES
command, do we have any such command to list all databases created so far?
推荐答案
此页面提到命令SHOW DATABASES
.
从手册中:
SHOW (DATABASES|SCHEMAS) [LIKE identifier_with_wildcards];
SHOW DATABASES列出了元存储中定义的所有数据库.可选的LIKE子句允许使用正则表达式过滤数据库列表.正则表达式中的通配符只能是"(对于任何字符)或"|"供选择.例如'employees','emp','emp * | * ees',所有这些都与名为'employees'的数据库匹配.
SHOW DATABASES lists all of the databases defined in the metastore. The optional LIKE clause allows the list of databases to be filtered using a regular expression. Wildcards in the regular expression can only be '' for any character(s) or '|' for a choice. Examples are 'employees', 'emp', 'emp*|*ees', all of which will match the database named 'employees'.
这篇关于如何列出到目前为止正在使用或创建的所有配置单元数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!