# Load Data with Liquibase

Liquibase provides a database schema management solution that allows you to add version control to your SingleStore databases, manage revisions of your database, and deploy scripts. You can connect your SingleStore databases to Liquibase using [the SingleStore JDBC driver](https://docs.singlestore.com/db/v9.1/developer-resources/connect-with-application-development-tools/connect-with-java-jdbc/the-singlestore-jdbc-driver.md). Refer to [Supported features](https://www.liquibase.com/databases/singlestoredb) for a list of Liquibase features that SingleStore supports.

## Prerequisites

* A SingleStore cluster running SingleStore version 8.1 or later.
* [Download](https://github.com/memsql/S2-JDBC-Connector/releases/latest) the SingleStore JDBC driver `.jar` file.
* [Download](https://github.com/liquibase/liquibase-singlestore/releases/latest) the Liquibase extension for SingleStore.
* [Install Liquibase](https://docs.liquibase.com/).

## Connect with Liquibase from SingleStore

To connect to your SingleStore database with Liquibase,

1. Run the following command to initialize a new Liquibase project:
   ```shell
   liquibase init project
   ```
   You may use the default properties or customize the available parameters while initializing a new project. In this guide, we'll use **liquibase.properties** as the defaults file.

2. Place the downloaded SingleStore JDBC driver and Liquibase extension for SingleStore `.jar` files in the **liquibase/lib** directory. If you are using Maven, add the following dependencies to your **pom.xml** file:
   ```xml
   <dependency>
       <groupId>com.singlestore</groupId>
       <artifactId>singlestore-jdbc-client</artifactId>
       <version>1.1.5</version>
   </dependency>
   <dependency>
       <groupId>org.liquibase.ext</groupId>
       <artifactId>liquibase-singlestore</artifactId>
       <version>1.0.0</version>
   </dependency> 
   ```

3. Customize the following parameters in the **liquibase.properties** file:

   * **url**: Specify the connection string for your SingleStore database in the following format: `jdbc:singlestore://<hostname>:<port>/<database>`.
   * **username**: Specify the username of the SingleStore database user that is used to access the database.
   * **password**: Specify the password for the SingleStore database user.
   * **driver**: Specify the JDBC Driver Class as `com.singlestore.jdbc.Driver`.
   * **classpath**: Specify the path to the downloaded SingleStore JDBC driver `.jar` file, including the filename and the **.jar** extension.

   Here's a sample **liquibase.properties** file:
   ```
   url:jdbc:singlestore://svchost:3306/dbTest
   username:s2user
   password:pa55w0rd
   liquibaseProLicenseKey: licensekey
   liquibase.hub.APIKey: APIKey
   driver:com.singlestore.jdbc.Driver
   classpath=~/singlestore-jdbc-client-1.1.5.jar
   ```

4. Update the changelog file in your project, and add a changeset. In this guide we'll use the following **changelog.sql** file:
   ```sql
   -- liquibase formatted sql

   -- changeset admin:1
   CREATE TABLE Stock (ID INT, Code VARCHAR(4), PRIMARY KEY(ID))
   ```

5. Run the following command from the Liquibase installation directory:
   ```shell
   liquibase status --changelog-file=changelog.sql

   ```
   ```output

   --
   Liquibase command 'status' was executed successfully.
   ```
   For a successful connection, the output contains a similar message.

Refer to [Using Liquibase with SingleStore](https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/singlestore/) for more information.

***

Modified at: September 26, 2025

Source: [/db/v9.1/load-data/integrate-with-singlestore/load-data-with-liquibase/](https://docs.singlestore.com/db/v9.1/load-data/integrate-with-singlestore/load-data-with-liquibase/)

(An index of the documentation is available at /llms.txt)
