nickes
June 12, 2025, 7:41pm
1
Hello people!
I’m doing some tests of liquibase in Databricks (using the connector ).
I create two specific catalog.schema:
xxxx_dev.liquibase_demo
xxxx_prod.liquibase_demo
To generate the xml file when I use the CLI, I use this command:
liquibase generateChangelog --url="jdbc:databricks://adb-xxxxxxxxx.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=/sql/1. 0/warehouses/xxxxxxxx;AuthMech=3;ConnCatalog=xxxx_prod;ConnSchema=liquibase_test;" --username=“token” --password=“xxxxxx” changelog-file=changelog_prod.xml
Gives the following error:
Gives the following error:
ERROR: Exception Details
ERROR: Exception Primary Class: InvalidExampleException
ERROR: Exception Primary Reason: Found multiple catalog/schemas matching xxxx_prod.liquibase_demo
ERROR: Exception Primary Source: 4.32.0
The funny thing is that it works when I remove the schema from the development catalog, is there any parameter to avoid this error? The two schemas are in different catalogs.
Thank you very much in advance
Pete
June 16, 2025, 2:22pm
2
Welcome to the forum @nickes ! Thanks for sharing the issue you’re having. This was also reported by a user in the following issue on the Liquibase GitHub repo linked below. The dev team has prioritized this and pulled it into a sprint. You can follow the issue for updates on when this might be released.
opened 09:49AM - 06 Jun 25 UTC
### Search first
- [x] I searched and no similar issues were found
### Descrip… tion
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 the `liquibase` schema
* Run `liquibase status`. It will fail
* Change in the `liquibase.properties` the schema setting it to `test`
* 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!)