querySql.ffdf: Retrieves data to an ffdf object

Description Usage Arguments Details Value Examples

Description

This function sends SQL to the server, and returns the results in an ffdf object.

Usage

1

Arguments

connection

The connection to the database server.

sql

The SQL to be send.

Details

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.

Value

A ffdf object containing the data. If there are 0 rows, a regular data frame is returned instead (ffdf cannot have 0 rows)

Examples

 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)

fagirtmi/DatabaseConnector documentation built on May 16, 2019, 9:58 a.m.