Outputs saved in the data preparation program in data base's tables
conn
: connection of the data base
data
: data that is going to be saved in the data base
query
: query
FUN_DB
: fun used in function DBConnectWrite (MyConSCDIRwrite)
lastmonths
: parameter from function MyAppend
datecolumn
: parameter from function Myappend
FUN_DB
: fun used in function DBConnectWrite (MyConSCDIRwrite)
table
: name of the data base's table used to save the data (to be added by the user)
f_DBConnectWrite(...)
function DBConnectWrite()
from MyFunnew.R script in data preparation program (a source must be done beforehand to MyFun.R script)
By defaut : DBConnectWrite( conn, data, table, FUN_DB, ... )
LogWrite <- DBConnectWrite( SCDataBase, QVlocs, 'PAR_LOC_geoMapping', MyConSCDIRwrite )
is now replaced by
LogWrite <- Output_db( conn = SCDatabase, data = QVlocs, table = 'PAR_LOC_geoMapping', FUN_DB = MyConSCDIRWrite, process = 'SLA' )$f_DBConnectWrite()
f_Myappend()
function Myappend()
from MyFunnew.R script in data preparation program (a source must be done beforehand to MyFun.R script)
By defaut : Myappend(conn, data, table, datecolumn, lastmonths)
LogWrite <- Myappend(SCDataBase, ISL, 'cal_isl', 'DATE' , (pstmnths2run+1) )
is now replaced by
LogWrite <- Output_db( conn = SCDataBase, data = ISL, table = 'cal_isl', datecolumn = 'DATE', lastmonths = (pstmnths2run+1), process = 'ISL' )$f_Myappend()
f_dbSendUpdate(...)
function dbSendQuery()
from DBI package.
By defaut : dbSendUpdate( conn, query, ...)
dbSendUpdate( SCDataBase, 'INSERT INTO sla_history SELECT * FROM slatemp' )
is now replaced by
Output_db( conn = SCDatabase, query = 'INSERT INTO sla_history SELECT * FROM slatemp', table = 'sla_history', process = 'SLA' )$dbSendUpdate()
f_dbWriteTable(...)
function dbWriteTable()
from DBI package.
By defaut : dbWriteTable( conn, table, data, ... )
dbWriteTable(SCDataBase, 'PAR_LOC_geoMapping', QVlocs, row.names = FALSE, append = FALSE,overwrite = TRUE, date = TRUE, ora.number = ORANUMBER)
is now replaced by
Output_db( conn = SCDataBase, table = 'PAR_LOC_geoMapping', data = QVlocs, process = 'Total_Supply' )$f_dbWriteTable( row.names = FALSE, append = FALSE,overwrite = TRUE, date = TRUE, ora.number = ORANUMBER )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.