Description
Search first
- I searched and no similar issues were found
Description
I'm using
- Java 11.0.15 (version 4.32.0 #8159 built at 2025-05-19 23:00+0000)
- Liquibase Open Source Version: 4.32.0 TAKEN FROM https://github.com/liquibase/liquibase/releases/download/v4.32.0/liquibase-4.32.0.zip
and added these libs
- lib\DatabricksJDBC42.jar: DatabricksJDBC42 UNKNOWN taken from https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.7.3/DatabricksJDBC42-2.7.3.1010.zip
- lib\liquibase-databricks-1.4.1.jar: Liquibase Extension: Databricks support 1.4.1 from https://github.com/liquibase/liquibase-databricks/releases/download/v1.4.1/liquibase-databricks-1.4.1.jar
I'm trying to use Liquibase to execute some SQL scripts on a Databricks catalog.
My liquibase.properties
file has the following details
liquibase.command.url=jdbc:databricks://ADB_HOSTNAME.azuredatabricks.net:443;AuthMech=3;httpPath=/sql/1.0/warehouses/WAREHOUSE_ID;ConnCatalog=cat1;ConnSchema=liquibase;
liquibase.command.username=token
# PAT taken from Databricks in Settings > Developer > Access tokens > Manage
liquibase.command.password=TOKEN
From the folder containing the liquibase.properties
file I run the command
liquibase --changelog-file=db.changelog-master.xml status
The output I have is
####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## ##
####################################################
Starting Liquibase at 11:27:33 using Java 11.0.15 (version 4.32.0 #8159 built at 2025-05-19 23:00+0000)
Liquibase Version: 4.32.0
Liquibase Open Source 4.32.0 by Liquibase
ERROR: Exception Details
ERROR: Exception Primary Class: InvalidExampleException
ERROR: Exception Primary Reason: Found multiple catalog/schemas matching cat1.liquibase
ERROR: Exception Primary Source: 4.32.0
Unexpected error running Liquibase: Found multiple catalog/schemas matching cat1.liquibase
I checked and in the cat1
catalog there is only one liquibase
schema. What seems to happen here is that the liquibase
schema is searched between all the catalogs, not only into the refernced cat1
catalog. In fact, the user used by Liquibase can access multiple catalogs on the same Databricks instance and each of this catalogs have a liquibase
schema.
Instead, if I change the schema to one another that exists only in cat1
, the Liquibase command works as expected. To me, Liquibase is searching for the schema between all the catalogs, not only into the referenced one.
Steps To Reproduce
- Have a Databricks installation
- Create at least two catalogs
- In each catalog, create the same
liquibase
schema - In just one of the catalogs create one another schema
test
- Configure the
liquibase.properties
as described in the description, pointing to one of the catalogs and to theliquibase
schema - Run
liquibase status
. It will fail - Change in the
liquibase.properties
the schema setting it totest
- Run
liquibase status
. It will succeed
Expected/Desired Behavior
The command should work on the liquibase
schema of the choosen catalog, even though there are multiple catalogs containing the same liquibase
schema
Liquibase Version
4.32.0
Database Vendor & Version
Databricks
Liquibase Integration
CLI
Liquibase Extensions
DatabricksJDBC42-2.7.3.1010, liquibase-databricks-1.4.1
OS and/or Infrastructure Type/Provider
Windows 11 x64
Additional Context
No response
Are you willing to submit a PR?
- I'm willing to submit a PR (Thank you!)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status