databricks-sql-cli icon indicating copy to clipboard operation
databricks-sql-cli copied to clipboard

Add Catalog handling in database name

Open johnbrandborg opened this issue 1 year ago • 0 comments

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:

  1. The list_databases method used by \lwas not returning the headers properly, but rather a database and catalog.
  2. A method called reconnect on the SQLExecute was made redundant by the method connect which did the same thing.

johnbrandborg avatar Mar 16 '23 09:03 johnbrandborg