Applies to: Databricks SQL Databricks Runtime 10.3 and above Unity Catalog only
Lists the catalogs that match an optionally supplied regular expression pattern. If no pattern is supplied then the command lists all catalogs in the metastore.
A regular expression pattern that is used to filter the results of the statement. - Except for
|character, the pattern works like a regular expression. -
*alone matches 0 or more characters and
|is used to separate multiple different regular expressions, any of which can match. - The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.
-- Create catalogs. > CREATE CATALOG payroll_cat; > CREATE CATALOG payments_cat; -- Lists all the catalogs. > SHOW CATALOGS; catalog -------------- hive_metastore main payments_cat payroll_cat -- Lists catalogs with name starting with string pattern `pay` > SHOW CATALOGS LIKE 'pay*'; catalog ------------ payments_cat payroll_cat