r - 警告消息:在 dbFetch(rs, n = n, ...) 中:获取行时出错
问题描述
我正在使用 R 从 MySql 获取数据并Warning message: In dbFetch(rs, n = n, ...) : error while fetching rows
出现错误。我需要了解如何批量获取数据以避免此类错误。
我的代码:
Df<-
ColId Range
IOP-22 232
IOP-23 234
其中 datafrme 包含约 20000 个条目,并传递ColId
给 MySql 查询:
get_dt<-paste0("select ColId,col1, col2, col3 from mytable where ColId IN (", paste(shQuote(Df$ColId , type = "sh"),
collapse = ', '), ");")
解决方案
推荐阅读
- reactjs - 使用 Cognito 授权方从 API 网关返回 401 - 无论传入什么
- fluentd - FluentD:转发与 TCP 输入
- javascript - Vue.js - 为按字母排序的列表创建字母标题
- javascript - 使用 asp.net MVC 部署后,Jsreport.local 在 IIS 服务器上不起作用?
- swift - 如何在其他视图中使用 Swift 中的 AVPlayer 暂停和播放音乐
- generics - 推断类型为 String 但没有任何预期
- r - 如何读取由多个不同长度的注释数据帧组成的单个 .csv 文件作为列表?
- angular - 在数据出现之前在视图中加载指令的问题
- sql - 尽管源表中缺少记录,如何始终运行 UPDATE FROM?
- autocomplete - Visual Studio Code 中的自动完成功能对 Bootstrap 4 不起作用?