powered by
Generate a BULK INSERT statement, optionally execute the statement if con is not NULL.
t_sql_bulk_insert(file, schema = NULL, table, con = NULL, ...)
A string, the BULK INSERT statement; or the results retrieved by DBI::dbGetQuery after executing the statement.
A string, the file path to the file with data to insert.
A string, the schema name of the destination SQL table.
A string, the table name of the destination SQL table.
A database connection that can be passed to DBI::dbSendQuery/DBI::dbGetQuery.
named arguments are passed to the WITH statement.
t_sql_bulk_insert( file = tempfile(), schema = "test", table = "table1", format = 'CSV', first_row = 2, )
Run the code above in your browser using DataLab