dbSafeWriteTable | R Documentation |
calls dbWriteTable() on small chunks
dbSafeWriteTable( con, name, x, append = TRUE, chunkSize = 1000, verbose = TRUE, ... )
con |
a *Connection object |
name |
table name |
x |
data.table |
append |
default to TRUE |
chunkSize |
default 1000 rows |
verbose |
default to TRUE |
... |
passed to dbWriteTable |
## Not run: x = data.table(col1 = rep('a', 1000010), col2 = rnorm(1000010)) con = dbcon('mihai', host = '127.0.0.1', db = 'tests') dbq(con, 'CREATE TABLE temp (col1 VARCHAR(50) NULL,col2 FLOAT NULL)' ) dbSafeWriteTable(con, 'temp', x) dbq(con, 'DROP TABLE temp') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.