Description Usage Arguments Details Value Examples
View source: R/HelperFunctions.R
This function sends SQL to the server, and returns the results in an ffdf object.
1 | querySql.ffdf(connection, sql)
|
connection |
The connection to the database server. |
sql |
The SQL to be send. |
Retrieves data from the database server and stores it in an ffdf object. This allows very large data sets to be retrieved without running out of memory. If an error occurs during SQL execution, this error is written to a file to facilitate debugging.
A ffdf object containing the data. If there are 0 rows, a regular data frame is returned instead (ffdf cannot have 0 rows)
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
library(ffbase)
connectionDetails <- createConnectionDetails(dbms = "mysql",
server = "localhost",
user = "root",
password = "blah",
schema = "cdm_v4") #' conn <- connect(connectionDetails)
count <- querySql.ffdf(conn, "SELECT COUNT(*) FROM person")
dbDisconnect(conn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.