Giter Site home page Giter Site logo

Comments (5)

mcred avatar mcred commented on August 17, 2024

Both the driver and extension are available. Have you run lpm update to get latest packages?

➜  ~ lpm search snowflake
     Package                                Category
├──  snowflake                              driver
└──  liquibase-snowflake                    extension

from liquibase-package-manager.

adeelmalik78 avatar adeelmalik78 commented on August 17, 2024

Here's my output from running these commands and contents of /liquibase and/liquibase/lib directory. Notice it's missing the liquibase-snowflake.jar file. Could it be the JAVA_OPS issue?

I logged into the container using docker run -it liquibase/liquibase:latest sh

Then ran these commands inside the container:

$ lpm search snowflake
     Package                                Category
├──  snowflake                              driver
└──  liquibase-snowflake                    extension
$ lpm add snowflake
Checksum verified. Installing snowflake-jdbc-3.13.14.jar to /liquibase/liquibase_libs/
snowflake-jdbc-3.13.14.jar successfully installed in classpath.

---------- IMPORTANT ----------
Add the following JAVA_OPTS to your CLI:
export JAVA_OPTS="-cp liquibase_libs/*:/liquibase/lib/*:/liquibase/liquibase.jar"
$ lpm add snowflake --global
snowflake is already installed.
$ 
$ pwd
/liquibase
$ 
$ ls -alh       
total 6.7M
drwxr-xr-x 1 liquibase root      4.0K Mar  2 02:54 .
drwxr-xr-x 1 root      root      4.0K Mar  2 02:53 ..
-rw-r--r-- 1 liquibase liquibase   50 Feb 21 18:41 ABOUT.txt
-rw-r--r-- 1 liquibase liquibase  11K Feb 21 18:41 GETTING_STARTED.txt
-rw-r--r-- 1 liquibase liquibase  12K Feb 21 18:41 LICENSE.txt
-rw-r--r-- 1 liquibase liquibase 2.8K Feb 21 18:41 README.txt
-rw-r--r-- 1 liquibase liquibase  908 Feb 21 18:41 UNINSTALL.txt
drwxr-xr-x 1 liquibase liquibase 4.0K Feb 22 17:47 bin
drwxr-xr-x 2 root      root      4.0K Mar  2 02:53 changelog
-rw-r--r-- 1 liquibase liquibase 148K Feb 21 18:41 changelog.txt
drwxr-xr-x 2 root      root      4.0K Mar  2 02:53 classpath
-rwxr-xr-x 1 liquibase liquibase  461 Feb 22 17:47 docker-entrypoint.sh
drwxr-xr-x 6 liquibase liquibase 4.0K Feb 21 18:41 examples
drwxr-xr-x 1 liquibase liquibase 4.0K Feb 22 17:47 lib
drwxr-xr-x 2 liquibase liquibase 4.0K Feb 21 18:41 licenses
-rwxr-xr-x 1 liquibase liquibase 2.2K Feb 18 21:50 liquibase
-rw-r--r-- 1 liquibase liquibase 1.1K Feb 18 21:50 liquibase.bat
-rw-r--r-- 1 liquibase liquibase   78 Feb 22 17:47 liquibase.docker.properties
-rw-r--r-- 1 liquibase liquibase 6.4M Feb 21 18:41 liquibase.jar
-rw-r--r-- 1 liquibase liquibase   59 Mar  2 02:54 liquibase.json
drwxr-xr-x 2 liquibase liquibase 4.0K Mar  2 02:54 liquibase_libs
$ 
$ ls -alh lib/  
total 55M
drwxr-xr-x 1 liquibase liquibase  4.0K Feb 22 17:47 .
drwxr-xr-x 1 liquibase root       4.0K Mar  2 02:54 ..
-rw-r--r-- 1 liquibase liquibase  2.5M Jan 20 22:56 h2-2.1.210.jar
-rw-r--r-- 1 liquibase liquibase  1.6M Nov 16 19:03 hsqldb-2.5.2.jar
-rw-r--r-- 1 liquibase liquibase  123K Nov 16 18:54 jaxb-api-2.3.0.jar
-rw-r--r-- 1 liquibase liquibase  250K Nov 16 18:54 jaxb-core-2.3.0.jar
-rw-r--r-- 1 liquibase liquibase  942K Nov 16 18:54 jaxb-impl-2.3.0.jar
-rw-r--r-- 1 liquibase liquibase  1.3M Nov 16 19:03 jaybird-4.0.3.java8.jar
-rw-r--r-- 1 liquibase liquibase  6.4M Nov 16 19:03 jcc-11.5.6.0.jar
-rw-r--r-- 1 liquibase liquibase  3.2K Feb 18 21:50 liquibase_autocomplete.sh
-rwxr-xr-x 1 liquibase liquibase  2.9K Feb 18 21:50 liquibase_autocomplete_mac.bash
-rw-r--r-- 1 liquibase liquibase  610K Nov 16 18:54 mariadb-java-client-2.7.0.jar
-rw-r--r-- 1 liquibase liquibase  1.3M Nov 16 19:03 mssql-jdbc-8.4.0.jre8.jar
-rw-r--r-- 1 liquibase liquibase  4.0M Nov 16 19:03 ojdbc8-18.3.0.0.jar
-rw-r--r-- 1 liquibase liquibase  271K Feb 22 17:47 packages.json
-rw-r--r-- 1 liquibase liquibase  393K Nov 16 18:57 picocli-4.6.1.jar
-rw-r--r-- 1 liquibase liquibase 1016K Feb  2 17:05 postgresql-42.3.2.jar
-rw-r--r-- 1 liquibase liquibase  303K Nov 16 18:54 snakeyaml-1.27.jar
-rw-r--r-- 1 liquibase liquibase   27M Feb 22 17:47 snowflake-jdbc-3.13.14.jar
-rw-r--r-- 1 liquibase liquibase  7.0M Nov 16 19:03 sqlite-jdbc-3.34.0.jar
$ 

from liquibase-package-manager.

mcred avatar mcred commented on August 17, 2024

According to your output, the snowflake driver was installed.
-rw-r--r-- 1 liquibase liquibase 27M Feb 22 17:47 snowflake-jdbc-3.13.14.jar

From your description, you also need to add the extension lpm add liquibase-snowflake. This can be done in a one-liner as lpm add liquibase-snowflake snowflake. The extension and drive are separate artifacts and as you pointed out in the original post, both need to be installed.

➜  ~ lpm add liquibase-snowflake snowflake
Checksum verified. Installing liquibase-snowflake-4.8.0.jar to /Users/mcred/liquibase_libs/
liquibase-snowflake-4.8.0.jar successfully installed in classpath.
Checksum verified. Installing snowflake-jdbc-3.13.15.jar to /Users/mcred/liquibase_libs/
snowflake-jdbc-3.13.15.jar successfully installed in classpath.

from liquibase-package-manager.

adeelmalik78 avatar adeelmalik78 commented on August 17, 2024

Thank you @mcred! I tested this locally and it worked.

This impacts the liquibase docker image because it now requires two lpm commands to make it work with snowflake. I created a PR (#152) in liquibase/docker repo to add RUN lpm add liquibase-snowflake --global command in Dockerfile but I feel it should not be necessary. One lpm command should be enough to pull driver and extension together.

from liquibase-package-manager.

mcred avatar mcred commented on August 17, 2024

You can do it with one command, pass in multiple packages to lpm add like the example above. The driver and extension are not the same thing and shouldn't be confused with each other. They have different upstream providers and different version numbers.

from liquibase-package-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.