I am using RODBCext to create a parameter query to retrieve data from a DB2 mainframe. I want to insert that data into a table in a local MYSQL (on the same network) to be able to access the data much more quickly and on the fly with a Shiny app. i am not sure how to do that. The below sql works to retrieve my db2 data, but i cant find help learning how to create the rmysql connection in the same r.script to insert it automatically into the mysql db. any help, tips or pointers would be appreciated.
library(RODBCext)
library(RMySQL)
##
DB2Conn1 <- odbcConnect("dsn", uid = "xxx", pwd = "xxx")
##################################################################
plan_id <- paste("Select Field1, Field2 FROM DB2.Table1
where Field2 = 'M' ")