getting started with liquibase on snowflake

我们两清 提交于 2019-12-24 08:54:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!