Flyway-Databricks 集成

发布于 2025-01-16 23:52:09 字数 1781 浏览 2 评论 0原文

我正在探索用于数据库迁移的Flyway。我想将它与 Databricks 集成。已执行一些任务并尝试克服以下错误。

到目前为止,我已经

  1. 在本地计算机上执行了 Flyway 设置
  2. spark-jdbc databricks 驱动程序复制到 Flyway 的 drivers 文件夹
  3. 更新了 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>

  1. 收到错误

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

  1. Flyway setup on the local machine.
  2. Copied spark-jdbc databricks driver to drivers folder of Flyway
  3. 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>

  1. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

又爬满兰若 2025-01-23 23:52:09

错误 - org.flywaydb.core.api.FlywayException:找不到数据库
处理 jdbc:spark://:443/

出现这个错误是因为驱动版本不同。

尝试使用降级版本。如果不起作用,您可以尝试不同的配置组合。

对于类似的问题,您可以参考此 github 链接

Error - org.flywaydb.core.api.FlywayException: No database found to
handle jdbc:spark://:443/

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文