Package: DatabaseConnector 7.2.0

Martijn Schuemie

DatabaseConnector: Connecting to Various Database Platforms

An R 'DataBase Interface' ('DBI') compatible interface to various database platforms ('PostgreSQL', 'Oracle', 'Microsoft SQL Server', 'Amazon Redshift', 'Microsoft Parallel Database Warehouse', 'IBM Netezza', 'Apache Impala', 'Google BigQuery', 'Snowflake', 'Spark', 'SQLite', and 'InterSystems IRIS'). Also includes support for fetching data as 'Andromeda' objects. Uses either 'Java Database Connectivity' ('JDBC') or other 'DBI' drivers to connect to databases.

Authors:Martijn Schuemie [aut, cre], Marc Suchard [aut], Adam Black [aut], Observational Health Data Science and Informatics [cph], Microsoft Inc. [cph], PostgreSQL Global Development Group [cph], Oracle Inc. [cph], Amazon Inc. [cph]

DatabaseConnector_7.2.0.tar.gz
DatabaseConnector_7.2.0.zip(r-4.7)DatabaseConnector_7.2.0.zip(r-4.6)DatabaseConnector_7.2.0.zip(r-4.5)
DatabaseConnector_7.2.0.tgz(r-4.6-any)DatabaseConnector_7.2.0.tgz(r-4.5-any)
DatabaseConnector_7.2.0.tar.gz(r-4.7-any)DatabaseConnector_7.2.0.tar.gz(r-4.6-any)
DatabaseConnector_7.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
DatabaseConnector/json (API)

# Install 'DatabaseConnector' in R:
install.packages('DatabaseConnector', repos = c('https://ohdsi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ohdsi/databaseconnector/issues

Pkgdown/docs site:https://ohdsi.github.io

Uses libs:
  • openjdk– OpenJDK Java runtime, using Hotspot JIT

On CRAN:

Conda:

hadesopenjdk

13.12 score 57 stars 17 packages 1.2k scripts 2.9k downloads 2 mentions 53 exports 41 dependencies

Last updated from:128c84fa4f. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING186
source / vignettesOK242
linux-release-x86_64WARNING180
macos-release-arm64WARNING123
macos-oldrel-arm64WARNING102
windows-develWARNING108
windows-releaseWARNING2717
windows-oldrelWARNING125
wasm-releaseOK172

Exports:assertTempEmulationSchemaSetcomputeDataHashconnectcreateConnectionDetailscreateDbiConnectionDetailscreateZipFileDatabaseConnectorDriverdbAppendTabledbCanConnectdbClearResultdbColumnInfodbConnectdbCreateTabledbDisconnectdbExecutedbExistsTabledbFetchdbGetInfodbGetQuerydbGetRowCountdbGetRowsAffecteddbGetStatementdbHasCompleteddbIsReadOnlydbIsValiddbListFieldsdbListTablesdbmsdbReadTabledbRemoveTabledbSendQuerydbSendStatementdbUnloadDriverdbWriteTabledisconnectdownloadJdbcDriversdropEmulatedTempTablesexecuteSqlexistsTableextractQueryTimesgetAvailableJavaHeapSpacegetTableNamesinDatabaseSchemainsertTableisSqlReservedWordquerySqlquerySqlToAndromedarenderTranslateExecuteSqlrenderTranslateQueryApplyBatchedrenderTranslateQuerySqlrenderTranslateQuerySqlToAndromedarequiresTempEmulationsql_escape_logical

Dependencies:backportsbitbit64blobcheckmateclicliprcpp11crayonDBIdbplyrdigestdplyrgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogresspurrrR6RcppreadrrJavarlangSqlRenderstringistringrtibbletidyrtidyselecttriebeardtzdburltoolsutf8vctrsvroomwithr

Connecting to a database
Introduction | Obtaining drivers | The JAR folder | Obtaining drivers for SQL Server, Oracle, PostgreSQL, PDW, Spark, RedShift, Snowflake, BigQuery, and Synapse | Obtaining drivers for Netezza, Impala and InterSystems IRIS | Obtaining drivers for SQLite or DuckDb | Creating a connection | Using Windows Authentication for SQL Server | Connecting to a SQLite database | Connecting with Windows authentication from a non-windows machine

Last update: 2026-01-08
Started: 2022-02-09

Querying a database
Introduction | Querying | Querying using Andromeda objects | Querying different platforms using the same SQL | Inserting tables | Logging all queries

Last update: 2023-01-30
Started: 2022-02-09

Using DatabaseConnector through DBI and dbplyr
Introduction | Connecting | Querying | Using dbplyr | Date functions | Allowed table and field names in dbplyr | Temp tables | Temp tables in dbplyr | Cleaning up emulated temp tables | Closing the connection

Last update: 2023-01-30
Started: 2023-01-30

Readme and manuals

Help Manual

Help pageTopics
Assert the temp emulation schema is setassertTempEmulationSchemaSet
Compute hash of datacomputeDataHash
connectconnect
createConnectionDetailscreateConnectionDetails
Create DBI connection detailscreateDbiConnectionDetails
Compress files and/or folders into a single zip filecreateZipFile
Create a DatabaseConnectorDriver objectDatabaseConnectorDriver
Insert rows into a tabledbAppendTable,DatabaseConnectorConnection,character-method
Clear a result setdbClearResult,DatabaseConnectorDbiResult-method
Clear a result setdbClearResult,DatabaseConnectorJdbcResult-method
Information about result typesdbColumnInfo,DatabaseConnectorDbiResult-method
Information about result typesdbColumnInfo,DatabaseConnectorJdbcResult-method
Create a connection to a DBMSdbConnect,DatabaseConnectorDriver-method
Create a table in the databasedbCreateTable,DatabaseConnectorConnection-method
Disconnect (close) a connectiondbDisconnect,DatabaseConnectorConnection-method
Change database statedbExecute,DatabaseConnectorDbiConnection,character-method
Change database statedbExecute,DatabaseConnectorJdbcConnection,character-method
Does a table exist?dbExistsTable,DatabaseConnectorConnection,character-method
Fetch records from a previously executed querydbFetch,DatabaseConnectorDbiResult-method
Fetch records from a previously executed querydbFetch,DatabaseConnectorJdbcResult-method
Get DBMS metadatadbGetInfo,DatabaseConnectorConnection-method
Get DBMS metadatadbGetInfo,DatabaseConnectorDriver-method
Retrieve results from a querydbGetQuery,DatabaseConnectorDbiConnection,character-method
Retrieve results from a querydbGetQuery,DatabaseConnectorJdbcConnection,character-method
The number of rows fetched so fardbGetRowCount,DatabaseConnectorDbiResult-method
The number of rows fetched so fardbGetRowCount,DatabaseConnectorJdbcResult-method
The number of rows affecteddbGetRowsAffected,DatabaseConnectorDbiResult-method
The number of rows affecteddbGetRowsAffected,DatabaseConnectorJdbcResult-method
Get the statement associated with a result setdbGetStatement,DatabaseConnectorDbiResult-method
Get the statement associated with a result setdbGetStatement,DatabaseConnectorJdbcResult-method
Completion statusdbHasCompleted,DatabaseConnectorDbiResult-method
Completion statusdbHasCompleted,DatabaseConnectorJdbcResult-method
Is this DBMS object still valid?dbIsValid,DatabaseConnectorDbiConnection-method
Is this DBMS object still valid?dbIsValid,DatabaseConnectorJdbcConnection-method
List field names of a remote tabledbListFields,DatabaseConnectorConnection,character-method
List remote tablesdbListTables,DatabaseConnectorConnection-method
Get the database platform from a connectiondbms
Declare dbplyr backend editiondbplyr_edition.DatabaseConnectorConnection dbplyr_edition.DatabaseConnectorDbiConnection dbplyr_edition.DatabaseConnectorJdbcConnection
Read database tables as data framesdbReadTable,DatabaseConnectorConnection,character-method
Remove a table from the databasedbRemoveTable,DatabaseConnectorConnection,ANY-method
Execute a query on a given database connectiondbSendQuery,DatabaseConnectorDbiConnection,character-method
Execute a query on a given database connectiondbSendQuery,DatabaseConnectorJdbcConnection,character-method
Execute a data manipulation statement on a given database connectiondbSendStatement,DatabaseConnectorConnection,character-method
Load and unload database driversdbUnloadDriver,DatabaseConnectorDriver-method
Copy data frames to database tablesdbWriteTable,DatabaseConnectorConnection,ANY-method
Disconnect from the serverdisconnect
Download DatabaseConnector JDBC Jar filesdownloadJdbcDrivers
Drop all emulated temp tables.dropEmulatedTempTables
Execute SQL codeexecuteSql
Does the table exist?existsTable
Extract query times from a 'ParallelLogger' log fileextractQueryTimes
Get available Java heap spacegetAvailableJavaHeapSpace
List all tables in a database schema.getTableNames
Refer to a table in a database schemainDatabaseSchema
Insert a table on the serverinsertTable
Test a character vector of SQL names for SQL reserved wordsisSqlReservedWord
How to download and use JDBC drivers for the various data platforms.jdbcDrivers
Retrieve data to a data.framequerySql
Retrieves data to a local Andromeda objectquerySqlToAndromeda
Render, translate, execute SQL coderenderTranslateExecuteSql
Render, translate, and perform process to batches of data.renderTranslateQueryApplyBatched
Render, translate, and query to data.framerenderTranslateQuerySql
Render, translate, and query to local AndromedarenderTranslateQuerySqlToAndromeda
Does the DBMS require temp table emulation?requiresTempEmulation