sdfImportDBI {SQLiteDF} | R Documentation |
Import data from a DBMS to a sqlite.data.frame using DBI.
sdfImportDBI(con, sql, batch.size = 2048, rownames = "row_names", iname = NULL)
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 |
This function just sends the query to the connection (DBI:::dbSendQuery
)
and then loops over the result set of the select statement (DBI:::fetch
).
The SDF containing the imported data.
Miguel A. R. Manese
## Not run: conn <- dbConnect("MySQL", group = "vitalAnalysis") fuel_frame.sdf <- sdfImportDBI(conn, "select * from fuel_frame", iname="fuel_frame") ## End(Not run)