Search code examples
databricksazure-databricksdatabricks-sqldatabricks-unity-catalog

databricks notebook to show schemas in a certain catalog


I know that in the databricks notebook, we can use spark.sql("show schemas") to get the schemas in the hive_metastore. Since the unity catalog is introduced, I am wondering how to show the schemas in a specified unity catalog?

Best wishes


Solution

  • For some reasons it's not documented in documentation, but it works in Databricks SQL & in DBR 12.2:

    show schemas in catalog_name