databricks-sql-cli
databricks-sql-cli copied to clipboard
Add Catalog handling in database name
The current setup doesn't allow for easy use of Catalogs from the Hive Metastore, and the Unity Catalog. This request adds the functionality so that catalogs can be selected.
The default catalog is hive_metastore when selecting a database with no period. (eg, \u default) If one period is given, it is assumed the format is <catalog>.<database>. This allows for easy selection of the catalog without to much complication. (eg, \u main.default)
Some addition minor updates/fixes on top of this:
- The list_databases method used by
\lwas not returning the headers properly, but rather a database and catalog. - A method called
reconnecton the SQLExecute was made redundant by the methodconnectwhich did the same thing.