【发布时间】:2018-07-23 15:42:34
【问题描述】:
我正在尝试使用模式下的 shinyR 访问 Redshift 上的一些表,我可以使用 library(RPostgresSQL) 连接到不在模式下的表,所以我知道这部分正在工作:
pconn_r <- dbConnect(RPostgres::Postgres(),
host = "xxxxxxxxxxxx",
port = "5439",
user = "rcd_admin",
password = "xxxxxxx",
dbname = "xxxx"
)
但我无法使用此命令访问架构 synapps 下的表 fr__synapps_drug__outpatient_index:
sql_command <- "Select cip13_code,cis_label,presentation_label,brand,period,hco_code,hco_label,hco_code_type,hco_city,bse,rem,unit from synapps.fr__synapps_drug__outpatient_index"
outpatient <- dbSendQuery(pconn_r, sql_command)
【问题讨论】:
-
看起来您缺少 fetch 语句。 output_data
-
然后我无法访问数据...不太清楚。请发布您收到的错误或不想要的结果。
-
fr__synapps_drug__outpatient_index是表还是索引? -
@MikeSherrill'CatRecall' 数据库是oip,架构是synapps,这个架构下的表是fr__synapps_drug__outpatient_index
标签: r postgresql amazon-redshift shiny-reactivity