Liquibase-hive is a Liquibase extension, which adds support for Apache Hive.
To use liquibase-hive in concert with liquibase-maven-plugin
:
- Make sure liquibase-hive is present in your local or remote (internal) Maven repo.
- 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>
- 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 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 |