|
1 | | -% Generated by roxygen2: do not edit by hand |
2 | | -% Please edit documentation in R/DBI.R |
3 | | -\name{dbWriteTable,DatabaseConnectorConnection,ANY-method} |
4 | | -\alias{dbWriteTable,DatabaseConnectorConnection,ANY-method} |
5 | | -\title{Copy data frames to database tables} |
6 | | -\usage{ |
7 | | -\S4method{dbWriteTable}{DatabaseConnectorConnection,ANY}( |
8 | | - conn, |
9 | | - name, |
10 | | - value, |
11 | | - databaseSchema = NULL, |
12 | | - overwrite = FALSE, |
13 | | - append = FALSE, |
14 | | - temporary = FALSE, |
15 | | - tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"), |
16 | | - ... |
17 | | -) |
18 | | -} |
19 | | -\arguments{ |
20 | | -\item{conn}{A \linkS4class{DBIConnection} object, as returned by |
21 | | -\code{\link[DBI:dbConnect]{dbConnect()}}.} |
22 | | - |
23 | | -\item{name}{The table name, passed on to \code{\link[DBI:dbQuoteIdentifier]{dbQuoteIdentifier()}}. Options are: |
24 | | -\itemize{ |
25 | | -\item a character string with the unquoted DBMS table name, |
26 | | -e.g. \code{"table_name"}, |
27 | | -\item a call to \code{\link[DBI:Id]{Id()}} with components to the fully qualified table name, |
28 | | -e.g. \code{Id(schema = "my_schema", table = "table_name")} |
29 | | -\item a call to \code{\link[DBI:SQL]{SQL()}} with the quoted and fully qualified table name |
30 | | -given verbatim, e.g. \code{SQL('"my_schema"."table_name"')} |
31 | | -}} |
32 | | - |
33 | | -\item{value}{A \link{data.frame} (or coercible to data.frame).} |
34 | | - |
35 | | -\item{databaseSchema}{The name of the database schema. See details for platform-specific details.} |
36 | | - |
37 | | -\item{overwrite}{Overwrite an existing table (if exists)?} |
38 | | - |
39 | | -\item{append}{Append to existing table?} |
40 | | - |
41 | | -\item{temporary}{Should the table created as a temp table?} |
42 | | - |
43 | | -\item{tempEmulationSchema}{Some database platforms like Oracle and Impala do not truly support temp tables. To |
44 | | -emulate temp tables, provide a schema with write privileges where temp tables |
45 | | -can be created.} |
46 | | - |
47 | | -\item{...}{Other parameters passed on to methods.} |
48 | | - |
49 | | -\item{oracleTempSchema}{DEPRECATED: use \code{tempEmulationSchema} instead.} |
50 | | -} |
51 | | -\value{ |
52 | | -\code{dbWriteTable()} returns \code{TRUE}, invisibly. |
53 | | -} |
54 | | -\description{ |
55 | | -Writes, overwrites or appends a data frame to a database table, optionally |
56 | | -converting row names to a column and specifying SQL data types for fields. |
57 | | - |
58 | | -\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbWriteTable")} |
59 | | -} |
60 | | -\details{ |
61 | | -The \code{databaseSchema} argument is interpreted differently according to the different platforms: |
62 | | -SQL Server and PDW: The databaseSchema schema should specify both the database and the schema, e.g. |
63 | | -'my_database.dbo'. Impala: the databaseSchema should specify the database. Oracle: |
64 | | -The databaseSchema should specify the Oracle 'user'. All other : The databaseSchema should |
65 | | -specify the schema. |
66 | | -} |
67 | | -\seealso{ |
68 | | -Other DBIConnection generics: |
69 | | -\code{\link[DBI]{DBIConnection-class}}, |
70 | | -\code{\link[DBI]{dbAppendTable}()}, |
71 | | -\code{\link[DBI]{dbAppendTableArrow}()}, |
72 | | -\code{\link[DBI]{dbCreateTable}()}, |
73 | | -\code{\link[DBI]{dbCreateTableArrow}()}, |
74 | | -\code{\link[DBI]{dbDataType}()}, |
75 | | -\code{\link[DBI]{dbDisconnect}()}, |
76 | | -\code{\link[DBI]{dbExecute}()}, |
77 | | -\code{\link[DBI]{dbExistsTable}()}, |
78 | | -\code{\link[DBI]{dbGetException}()}, |
79 | | -\code{\link[DBI]{dbGetInfo}()}, |
80 | | -\code{\link[DBI]{dbGetQuery}()}, |
81 | | -\code{\link[DBI]{dbGetQueryArrow}()}, |
82 | | -\code{\link[DBI]{dbIsReadOnly}()}, |
83 | | -\code{\link[DBI]{dbIsValid}()}, |
84 | | -\code{\link[DBI]{dbListFields}()}, |
85 | | -\code{\link[DBI]{dbListObjects}()}, |
86 | | -\code{\link[DBI]{dbListResults}()}, |
87 | | -\code{\link[DBI]{dbListTables}()}, |
88 | | -\code{\link[DBI]{dbQuoteIdentifier}()}, |
89 | | -\code{\link[DBI]{dbReadTable}()}, |
90 | | -\code{\link[DBI]{dbReadTableArrow}()}, |
91 | | -\code{\link[DBI]{dbRemoveTable}()}, |
92 | | -\code{\link[DBI]{dbSendQuery}()}, |
93 | | -\code{\link[DBI]{dbSendQueryArrow}()}, |
94 | | -\code{\link[DBI]{dbSendStatement}()}, |
95 | | -\code{\link[DBI]{dbUnquoteIdentifier}()}, |
96 | | -\code{\link[DBI]{dbWriteTableArrow}()} |
97 | | -} |
0 commit comments