问题
I am trying to get started with liquibase on snowflake.
I think I am almost there with the liquibase.properties file
driver: net.snowflake.client.jdbc.SnowflakeDriver
classpath: ./liquibase-snowflake-1.0.jar
url: jdbc:snowflake://XXXXXX.us-east-1.snowflakecomputing.com
username: YYYYYYYYY
password: ZZZZZZZZZZ
changeLogFile: mySnowflakeChangeLog.xml
Unfortunately, liquibase complains about not having a "current database" when trying to create the tables databasechangelog and/or databasechangeloglock.
Since, I do not have access to the sql script creating these database tables, how do I instruct liquibase which DATABASE to use?
回答1:
I pinged an internal team here @Snowflake. They recommended:
adding db=mydb database connection parameter to the URL.. or set default namespace for the user.. alter user mike set default_namespace=mydb
Hope that helps!
回答2:
I am not an expert in liquibase, but JDBC standard allows custom connection properties being passed in. If liquibase support that, you can specify database as a custom connection property, and Snowflake JDBC will pass the database information with create connection request sending to the server.
来源:https://stackoverflow.com/questions/58383724/getting-started-with-liquibase-on-snowflake