importJDBC(sqlQuery, table, driverClass, con, user, password, keepAlive = FALSE, bigdata = FALSE)
table
is not provided.
sqlQuery
is not provided. Implies
sqlQuery="SELECT * FROM <table>"
.
TRUE
, keeps the database connection alive after executing the query. The default is
FALSE
.
TRUE
, create and return a
bdFrame
object, rather than a
data.frame
. This allows reading much larger datasets than can be read into memory.
Imports data from the database using the JDBC driver specified in
driverClass
. The necessary JDBC driver must be
loaded in
sjdbc
before use. See
for details.
Database connections are closed by default after the query executes, unless
keepAlive
is set to
TRUE
. If
keepAlive = TRUE
,
the connection remains open, and successive database commands can reuse the open connection if and only if the same values
for
driverClass
,
con
,
user
, and
password
are supplied.
data.frame
containing the requested data.
If
bigdata
is
TRUE
, returns a
bdFrame
object instead.
Character data can be imported into Spotfire S+ either as
character
or as
factor
.
importJDBC
uses the
value of
options(stringsAsFactors)
to determine how to import the data. Warning: If using both
options(stringsAsFactors=TRUE)
and
bigdata=TRUE
, make sure to set
bd.options("string.column.width")
to a value at least as large as the number of characters in the
longest string in your data, otherwise some string values may be truncated on import.
Some arguments can also be set using .
## Not run: importJDBC(driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver", con="jdbc:sqlserver://qadb-s2k:1433;databaseName=testdb;user=testqa;password=testqa;", sqlQuery="SELECT * FROM FUEL_FRAME") importJDBC(driverClass="COM.ibm.db2.jdbc.net.DB2Driver", con="jdbc:db2://qadb1:6789/QATESTDB", user="testqa", password="testqa", sqlQuery="SELECT * FROM FUEL_FRAME") ## End(Not run)