dbReadTableArrow | R Documentation |
Reads a database table as an Arrow object.
Use dbReadTable()
instead to obtain a data frame.
dbReadTableArrow(conn, name, ...)
conn |
A DBIConnection object, as returned by
|
name |
The table name, passed on to
|
... |
Other parameters passed on to methods. |
This function returns an Arrow object.
Convert it to a data frame with as.data.frame()
or
use dbReadTable()
to obtain a data frame.
dbReadTableArrow()
returns an Arrow object that contains the complete data
from the remote table, effectively the result of calling dbGetQueryArrow()
with
SELECT * FROM <name>
.
An empty table is returned as an Arrow object with zero rows.
An error is raised if the table does not exist.
An error is raised when calling this method for a closed
or invalid connection.
An error is raised
if name
cannot be processed with dbQuoteIdentifier()
or
if this results in a non-scalar.
The name
argument is processed as follows,
to support databases that allow non-syntactic names for their objects:
If an unquoted table name as string: dbReadTableArrow()
will do the
quoting,
perhaps by calling dbQuoteIdentifier(conn, x = name)
If the result of a call to dbQuoteIdentifier()
: no more quoting is done
Other DBIConnection generics:
DBIConnection-class
,
dbAppendTable()
,
dbAppendTableArrow()
,
dbCreateTable()
,
dbCreateTableArrow()
,
dbDataType()
,
dbDisconnect()
,
dbExecute()
,
dbExistsTable()
,
dbGetException()
,
dbGetInfo()
,
dbGetQuery()
,
dbGetQueryArrow()
,
dbIsReadOnly()
,
dbIsValid()
,
dbListFields()
,
dbListObjects()
,
dbListResults()
,
dbListTables()
,
dbQuoteIdentifier()
,
dbReadTable()
,
dbRemoveTable()
,
dbSendQuery()
,
dbSendQueryArrow()
,
dbSendStatement()
,
dbUnquoteIdentifier()
,
dbWriteTable()
,
dbWriteTableArrow()
# Read data as Arrow table
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbWriteTable(con, "mtcars", mtcars[1:10, ])
dbReadTableArrow(con, "mtcars")
dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.