Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 2.04 KB

README.md

File metadata and controls

53 lines (46 loc) · 2.04 KB

Table of contents

  1. About liquibase-hive
  2. How to use

About liquibase-hive

Liquibase-hive is a Liquibase extension, which adds support for Apache Hive.

How to use

with a Maven plugin

To use liquibase-hive in concert with liquibase-maven-plugin:

  1. Make sure liquibase-hive is present in your local or remote (internal) Maven repo.
  2. Add the following to your pom.xml file:
    <build>
      <plugins>
        <!-- (...) -->
        <plugin>
          <groupId>org.liquibase</groupId>
          <artifactId>liquibase-maven-plugin</artifactId>
          <version>${liquibase.version}</version>
          <dependencies>
            <!-- (...) -->
            <dependency>
              <groupId>org.liquibase.ext.hive</groupId>
              <artifactId>liquibase-hive</artifactId>
              <version>${liquibase.hive.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </build>
  3. Run Liquibase as you normally would using Maven plugin, for example:
    mvn liquibase:update \
      -Dliquibase.changeLogFile=changelog/changelog.xml \
      -Dliquibase.driver=com.cloudera.hive.jdbc41.HS2Driver \
      -Dliquibase.username=<user>
      -Dliquibase.password=<password>
      -Dliquibase.url=jdbc:hive2://<host>:<port>/<database>;UID=<user>;UseNativeQuery=1

Liquibase-hive specific configuration

Liquibase-hive provides additional configuration parameters that can be used to influence its behaviour:

parameter values description
liquibase.lock true (default), false enables/disables locking facility for a given job