如何在R中使用H2o从SQL Server加载表? [英] How to load table from SQL server using H2o in R?

查看:85
本文介绍了如何在R中使用H2o从SQL Server加载表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用h2o将表加载到R中,但是出现以下错误

I try to load table into R using h2o but had the following error

my_data <- h2o.import_sql_table(my_sql_conn, table, username, password)

错误:意外的HTTP状态代码:500服务器错误(URL = http://localhost:54321/99/ImportSQLTable )

ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/99/ImportSQLTable)

java.lang.RuntimeException [1]"java.lang.RuntimeException:SQLException:未找到适用于jdbc的驱动程序:mysql://10.140.20.29/MySQL?& useSSL = false \ n无法从SQL连接和读取具有connection_url的数据库:jdbc:mysql://10.140.20.29/MySQL?& useSSL = false"

java.lang.RuntimeException [1] "java.lang.RuntimeException: SQLException: No suitable driver found for jdbc:mysql://10.140.20.29/MySQL?&useSSL=false\nFailed to connect and read from SQL database with connection_url: jdbc:mysql://10.140.20.29/MySQL?&useSSL=false"

有人可以帮我吗?非常感谢!

Can someone help me with this? Thank you so much!

推荐答案

您需要受支持的JDBC(基于JDBC 42 Core构建)驱动程序才能从H2O连接到SQL Server.您可以先从下面的链接下载用于SQL Server的Microsoft JDBC驱动程序4.2:

You need a supported JDBC (Build on JDBC 42 Core) driver to connect from H2O to SQL Server. You can download Microsoft JDBC Driver 4.2 for SQL Server from the link below first:

https://www.microsoft.com/zh-CN -us/download/details.aspx?id = 54671

之后,请按照下面的文章首先从R/Python H2O客户端测试JDBC驱动程序,然后连接到您的数据库:

After that please follow the article below to first test JDBC driver from R/Python H2O client and then connect to your database:

以上文章是针对postgres的,但是您可以通过适当的驱动程序将其与SQL Server一起使用.

Above article is for postgres however you can use it with SQL server using an appropriate driver.

这篇关于如何在R中使用H2o从SQL Server加载表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆