Description Usage Arguments Details Value Time Zone Handling Note See Also Examples
Imports data from a database using JDBC drivers.
1 2 3 4 | importJDBC(sqlQuery, table, driverClass = sjdbcOptions()$driverClass,
con = sjdbcOptions()$con, user = sjdbcOptions()$user,
password = sjdbcOptions()$password,
keepAlive = sjdbcOptions()$keepAlive, bigdata = FALSE)
|
sqlQuery |
the SQL query string describing the data to be retreived from the database. Required if |
table |
a string specifying the name of the table to import. Required if |
driverClass |
a string containing the name of the Java class for the required JDBC driver. |
con |
the JDBC connection string. |
user |
a string specifying the user name with access to the database. |
password |
a string containing the password for the given user name on the database. |
keepAlive |
a logical. If |
bigdata |
unsupported in this version. Exists for compatibility with Spotfire S+. |
Imports data from the database using the JDBC driver specified in driverClass. The required JDBC driver must be
loaded in sjdbc before use. See loadJDBCDriver 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.
returns a data.frame containing the requested data.
Times, Dates, and Timestamps that the datebase returns are assumed to be GMT. The resulting timeDate objects
are created in GMT, without conversion. If you know the time zone of the incoming data, you can specify an alternative time
zone for the timeDate objects by setting options("time.zone") prior to import. For further details, see
the class.timeDate help file.
Character data can be imported either as character or as factor. importJDBC uses the
value of options(stringsAsFactors) to determine how to import the data.
Some arguments can also be set using sjdbcOptions.
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.