View source: R/db_write_table2.R
db_write_table2 | R Documentation |
Write table to database
db_write_table2( data, con, schema, table, fields = NULL, to_nvarchar = TRUE, overwrite = TRUE, append = !overwrite, unique_cols = everything(), to_utf16 = TRUE, temporary = FALSE, logging = TRUE, batch_rows = 1000, bulk = FALSE )
data |
Data. |
con |
Connection string. |
schema |
Schema name. |
table |
Table name. |
fields |
Named vector of column names and datatypes. If null, then automatic fetch by DBI::dbDataType. |
to_nvarchar |
Convert varchar datatype to nvarchar for easier encoding. |
overwrite |
Overwrite table. |
append |
Append table. |
unique_cols |
Columns, which makes appended data unique. You can use tidyselect styled helpers like starts_with(). Default: everything(). |
to_utf16 |
Convert to UTF-16LE, which is required for proper Microsoft SQL Server encoding. |
batch_rows |
Number of rows for a batch. Default: 1000. Suggestion: 10000. |
bulk |
Not yet implemented. Allows bulk insert using bcp.exe tool. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.