-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMySQL.R
32 lines (21 loc) · 919 Bytes
/
MySQL.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
library(DBI)
as.data.frame(ncaa_team_stats_2020)
con <- dbConnect(RMySQL::MySQL(),
dbname = "66VWMoTqkC",
host = "remotemysql.com",
port = 3306,
user = "66VWMoTqkC",
password = "xN0xMa34IV")
dbListTables(conn = con)
dbCreateTable(conn = con, name = "test3", fields = ncaa_team_stats_2020, temporary = FALSE, row.names = NULL)
dbReadTable(conn = con, name = "test3")
dbWriteTable(conn = con, name = "test3", value = ncaa_team_stats_2020, append = TRUE, row.name = FALSE)
dbAppendTable(conn = con, name = "test3", value = sqlData(con = con, ncaa_team_stats_2020))
sqlAppendTable(con = con, table = "test3", values = ncaa_team_stats_2020, row.names = NA)
dbB
con <- dbConnect(
bigrquery::bigquery(),
project = "ncaa-simulator",
dataset = "2020_ncaab_predictions",
billing = billing
)