R读取Greenplum database数据

Reading time ~1 minute

###R读取Greenplum database数据


####R读取gpdb的相关包安装

1
install.packages("RPostgreSQL")

####R读取股票代码

1
2
3
4
5
6
7
8
9
10

library(RPostgreSQL)

con <- dbConnect(PostgreSQL(), host = "10.2.28.234", port = 5432, user= "fitl", password="xxxx", dbname="fitl")

rs <- dbGetQuery(con,"select windcode, code, market, cnname, enname, type from hffd.tdb_codes")

head(rs, n=10L)

dbDisconnect(con)

####效果如下

通过RStuido测试

R读取股票代码数据

Puppet证书过期处理

Published on November 12, 2018

沪牌拍牌有多难

Published on March 12, 2018