Flyway-Databricks 集成
我正在探索用于数据库迁移的Flyway。我想将它与 Databricks 集成。已执行一些任务并尝试克服以下错误。
到目前为止,我已经
- 在本地计算机上执行了 Flyway 设置。
- 将 spark-jdbc databricks 驱动程序复制到 Flyway 的 drivers 文件夹
- 更新了 Flyway 配置
Picked-up the jdbc url from databricks cluster and created a token in databricks. Added these configurations in flyway config.
flyway.url= jdbc:spark://<hostname>:443/<database>;transportMode=http;ssl=1;AuthMech=3;httpPath=<httpPath>;UID=token;PWD=<token>
flyway.driver=com.simba.spark.jdbc.Driver
flyway.user=<dummy_username>
flyway.password=<token>
- 收到错误
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: No database found to handle jdbc:spark://<host>:443/<database>
at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForUrl(DatabaseTypeRegister.java:55)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:109)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:89)
at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:1653)
at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:1038)
at org.flywaydb.commandline.Main.main(Main.java:159)
I am exploring Flyway for Database migration. I want to integrate it with Databricks. Have performed some tasks and trying to overcome the following error.
Till now I have performed
- Flyway setup on the local machine.
- Copied spark-jdbc databricks driver to drivers folder of Flyway
- Updated the Flyway config
Picked-up the jdbc url from databricks cluster and created a token in databricks. Added these configurations in flyway config.
flyway.url= jdbc:spark://<hostname>:443/<database>;transportMode=http;ssl=1;AuthMech=3;httpPath=<httpPath>;UID=token;PWD=<token>
flyway.driver=com.simba.spark.jdbc.Driver
flyway.user=<dummy_username>
flyway.password=<token>
- Error received
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: No database found to handle jdbc:spark://<host>:443/<database>
at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForUrl(DatabaseTypeRegister.java:55)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:109)
at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:89)
at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:1653)
at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:1038)
at org.flywaydb.commandline.Main.main(Main.java:159)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出现这个错误是因为驱动版本不同。
尝试使用降级版本。如果不起作用,您可以尝试不同的配置组合。
对于类似的问题,您可以参考此 github 链接
This error occurred because of different versions of drivers.
Try with downgraded version. If it doesn’t work, you can try with different combinations of configuration.
For similar issue you can refer this github link