Change default catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 07:45 AM
It seems that when I am connecting to Databricks Warehouse, it is using the default catalog which is hive_metastore. Is there a way to define unity catalog to be the default?
I know I can run the query
USE CATALOG MAIN
And then the current session will use unity-catalog. But I am looking for a way that it will always be the default. So, if the first query after login we will be
CREATE SCHEMA IF NOT EXISTS MY_SCHEMA
The schema will be created inside the main catalog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 08:38 AM
You can set this per notebook or workspace or even at the compute level.
spark.databricks.sql.initial.catalog.name mycatalog
If you add this to your cluster's spark config, all tools that run using that cluster will default to that catalog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 08:58 AM
Thanks Brian2. Is there an equivalent config parameter for a SQL Warehouse?

