Unity Catalog system tables provide lots of metadata & log data related to the operations of Databricks. System tables are organized into separate schemas containing one to a few tables owned and updated by Databricks. The storage and the cost of the system tables are on Databricks while the customer pays for the compute the query the system tables. To enable the system schemas, you have to be a Databricks Account Admin. A quick run down of enabling the system tables via command line. This article assumes you have setup the databricks command line interface (cli).
First, obtain the METASTORE_ID with the command:
databricks metastores current --profile <DATABRICKS_CONFIG_PROFILE>
To list the available schemas:
databricks system-schemas list <METASTORE_ID> --profile <DATABRICKS_CONFIG_PROFILE>
Enable the `query` schema, containing query history, via command line:
databricks system-schemas enable <METASTORE_ID> query --profile <DATABRICKS_CONFIG_PROFILE>