Package: DatabaseConnector 6.3.2

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', and 'SQLite'). 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], Observational Health Data Science and Informatics [cph], Microsoft Inc. [cph], PostgreSQL Global Development Group [cph], Oracle Inc. [cph], Amazon Inc. [cph]

DatabaseConnector_6.3.2.tar.gz
DatabaseConnector_6.3.2.tar.gz(r-4.5-noble)DatabaseConnector_6.3.2.tar.gz(r-4.4-noble)
DatabaseConnector_6.3.2.tgz(r-4.4-emscripten)DatabaseConnector_6.3.2.tgz(r-4.3-emscripten)
DatabaseConnector.pdf |DatabaseConnector.html
DatabaseConnector/json (API)
NEWS

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

Peer review:

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

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

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

openjdk

7.07 score 8 packages 740 scripts 2.2k downloads 2 mentions 62 exports 42 dependencies

Last updated 1 years agofrom:7ccc95d22f. Checks:OK: 1 WARNING: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 06 2024
R-4.5-linuxWARNINGDec 06 2024

Exports:assertTempEmulationSchemaSetcomputeDataHashconnectcreateConnectionDetailscreateDbiConnectionDetailscreateZipFileDatabaseConnectorDriverdateAdddateDiffdateFromPartsdaydbAppendTabledbCanConnectdbClearResultdbColumnInfodbConnectdbCreateTabledbDisconnectdbExecutedbExistsTabledbFetchdbGetInfodbGetQuerydbGetRowCountdbGetRowsAffecteddbGetStatementdbHasCompleteddbIsReadOnlydbIsValiddbListFieldsdbListTablesdbmsdbReadTabledbRemoveTabledbSendQuerydbSendStatementdbUnloadDriverdbWriteTabledisconnectdownloadJdbcDriversdropEmulatedTempTableseoMonthexecuteSqlexistsTableextractQueryTimesgetAvailableJavaHeapSpacegetTableNamesinDatabaseSchemainsertTableisSqlReservedWordlowLevelExecuteSqllowLevelQuerySqllowLevelQuerySqlToAndromedamonthquerySqlquerySqlToAndromedarenderTranslateExecuteSqlrenderTranslateQueryApplyBatchedrenderTranslateQuerySqlrenderTranslateQuerySqlToAndromedarequiresTempEmulationyear

Dependencies:backportsbitbit64blobcheckmateclicliprcpp11crayonDBIdbplyrdigestdplyrfansigenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogresspurrrR6RcppreadrrJavarlangSqlRenderstringistringrtibbletidyrtidyselecttriebeardtzdburltoolsutf8vctrsvroomwithr

Connecting to a database

Rendered fromConnecting.Rmdusingknitr::rmarkdownon Dec 06 2024.

Last update: 2023-11-29
Started: 2022-02-11

Querying a database

Rendered fromQuerying.Rmdusingknitr::rmarkdownon Dec 06 2024.

Last update: 2023-11-29
Started: 2022-02-11

Using DatabaseConnector through DBI and dbplyr

Rendered fromDbiAndDbplyr.Rmdusingknitr::rmarkdownon Dec 06 2024.

Last update: 2023-11-29
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
Add an interval to a datedateAdd
Compute difference between datesdateDiff
Construct a date from partsdateFromParts
Extract the day from a dateday
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
Execute an update statement, query number of rows affected, and then close result setdbExecute,DatabaseConnectorConnection,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
Send query, retrieve results and then clear result setdbGetQuery,DatabaseConnectorConnection,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
Copy data frames from database tablesdbReadTable,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
Return the end of the montheoMonth
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
Execute SQL codelowLevelExecuteSql
Low level function for retrieving data to a data framelowLevelQuerySql
Low level function for retrieving data to a local Andromeda objectlowLevelQuerySqlToAndromeda
Extract the month from a datemonth
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
Extract the year from a dateyear