sdfImportDBI {SQLiteDF}R Documentation

Import Data to an SQLite Data Frame

Description

Import data from a DBMS to a sqlite.data.frame using DBI.

Usage

sdfImportDBI(con, sql, batch.size = 2048, rownames = "row_names", iname = NULL)

Arguments

con a DBI connection object
sql a select statement to retrieve the data to be imported
batch.size the number of rows to be fetched from the connection at a time
rownames a string or index specifying the column in the result of the select statement to be used as the row.names of the SDF
iname the internal name of the created SDF

Details

This function just sends the query to the connection (DBI:::dbSendQuery) and then loops over the result set of the select statement (DBI:::fetch).

Value

The SDF containing the imported data.

Author(s)

Miguel A. R. Manese

See Also

dbSendQuery fetch dbReadTable

Examples

## Not run: 
conn <- dbConnect("MySQL", group = "vitalAnalysis")
fuel_frame.sdf <- sdfImportDBI(conn, "select * from fuel_frame", iname="fuel_frame")
## End(Not run)

[Package SQLiteDF version 0.1.32 Index]