1
votes

I am trying to use the Snowflake JDBC Driver with Flyway. I am on Flyway Core Version 0.5.1 and have the snowflake jdbc driver version 3.12.17 installed. When debugging, I can connect to Snowflake manually with:

DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD);

But when I try and set the Flyway data source like this:

flyway.setDataSource(DB_URL, DB_USER, DB_PASSWORD);

I get the following error:

Unable to autodetect JDBC driver for url: jdbc:snowflake://***.snowflakecomputing.com/?db=***&warehouse=COMPUTE_WH

I've tried setting the driver property manually:

Properties flywayProperties = new Properties();
flywayProperties.put("driver", "net.snowflake.client.jdbc.SnowflakeDriver");
flyway.setDataSource(DB_URL, DB_USER, DB_PASSWORD);

But unfortunately that didn't work either.

What am I doing wrong? How can I tell Flyway about my Snowflake JDBC Driver?

1

1 Answers

1
votes

Nevermind I just updated my Flyway to the latest (7.x) and it works fine. That's my recommendation to anyone in this situation. Just upgrade.