From 2d362498f9ef57b7a11e7a3426c3ee875adc22e7 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Wed, 6 Dec 2023 17:02:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20r-dbi/od?= =?UTF-8?q?bc@03a425aa5985e8e395b0eb1370171f55117fc8e8=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/pkgdown.yml | 2 +- .../dbConnect-OdbcDriver-method.html | 12 ++ dev/reference/index.html | 4 +- dev/reference/odbcListDataSources.html | 83 +++++++++++-- dev/reference/odbcListDrivers.html | 110 +++++++++++++----- dev/search.json | 2 +- 6 files changed, 169 insertions(+), 44 deletions(-) diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 6fd9d95d..aba87e9a 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2023-12-06T16:00Z +last_built: 2023-12-06T17:01Z urls: reference: https://r-dbi.github.io/odbc/reference article: https://r-dbi.github.io/odbc/articles diff --git a/dev/reference/dbConnect-OdbcDriver-method.html b/dev/reference/dbConnect-OdbcDriver-method.html index 886a944c..bcdb85e7 100644 --- a/dev/reference/dbConnect-OdbcDriver-method.html +++ b/dev/reference/dbConnect-OdbcDriver-method.html @@ -177,6 +177,18 @@

Detailshttps://www.connectionstrings.com is also a useful resource of example connection strings for a variety of databases.

+
+

Learn more

+ + + +

To learn more about databases:

diff --git a/dev/reference/index.html b/dev/reference/index.html index c088c2ae..b023f7b3 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -179,12 +179,12 @@

All functionsodbcListDataSources() -
List Available Data Source Names
+
List Configured Data Source Names
odbcListDrivers()
-
List Available ODBC Drivers
+
List Configured ODBC Drivers
odbcListObjectTypes() diff --git a/dev/reference/odbcListDataSources.html b/dev/reference/odbcListDataSources.html index 2660a0e4..0d3c1b1c 100644 --- a/dev/reference/odbcListDataSources.html +++ b/dev/reference/odbcListDataSources.html @@ -1,9 +1,15 @@ -List Available Data Source Names — odbcListDataSources • odbcList Configured Data Source Names — odbcListDataSources • odbc @@ -44,15 +50,18 @@
-

List the available data sources on your system. See the DSN Configuration files section of the -package README for details on how to install data sources for the most -common databases.

+

Collect information about the available data source names (DSNs). A DSN must +be both installed and configured with the driver manager to be included in +this list. Configuring a DSN just sets up a lookup table (e.g. in +odbc.ini) to allow users to pass only the DSN to dbConnect().

+

DSNs that are not configured with the driver manager can still be +connected to with dbConnect() by providing DSN metadata directly.

@@ -64,14 +73,64 @@

Usage

Value

-

A data frame with two columns.

name
-

Name of the data source

+

A data frame with two columns:

name
+

Name of the data source. The entries in this column can be +passed to the dsn argument of dbConnect().

description
-

Data Source description

+

Data source description.

+
+

Configuration

+ + + +

This function interfaces with the driver manager to collect information +about the available data source names.

+

For MacOS and Linux, the odbc package supports the unixODBC driver +manager. unixODBC looks to the odbc.ini configuration file for information +on DSNs. Find the location(s) of your odbc.ini file(s) with odbcinst -j.

+

In this example odbc.ini file:

+

[MySQL]
+Driver = MySQL Driver
+Database = test
+Server = 127.0.0.1
+User = root
+password = root
+Port = 3306

+

...the data source name is MySQL, which will appear in the name +column of this function's output. To pass the DSN as the dsn argument to +dbConnect(), pass it as a string, like "MySQL". +Driver = MySQL Driver references the driver name in odbcListDrivers() +output.

+

Windows is bundled +with an ODBC driver manager.

+

When a DSN is configured with a driver manager, information on the DSN will +be automatically passed on to dbConnect() when its dsn argument is set.

+

For example, with the MySQL data source name configured, and the driver +name MySQL Driver appearing in odbcListDrivers() output, the code:

+

con <-
+  dbConnect(
+    odbc::odbc(),
+    Driver = "MySQL Driver",
+    Database = "test",
+    Server = "127.0.0.1",
+    User = "root",
+    password = "root",
+    Port = 3306
+  )

+

...can be written:

+

con <- dbConnect(odbc::odbc(), dsn = "MySQL")

+

In this case, dbConnect() will look up the information defined for MySQL +in the driver manager (in our example, odbc.ini) and automatically +pass the needed arguments.

+
+
+

See also

+ +
diff --git a/dev/reference/odbcListDrivers.html b/dev/reference/odbcListDrivers.html index 6666b3d1..da7959ec 100644 --- a/dev/reference/odbcListDrivers.html +++ b/dev/reference/odbcListDrivers.html @@ -1,11 +1,17 @@ -List Available ODBC Drivers — odbcListDrivers • odbcList Configured ODBC Drivers — odbcListDrivers • odbc @@ -46,16 +52,19 @@
-

List the available drivers on your system. See the -Installation section of the -package README for details on how to install drivers for the most common -databases.

+

Collect information about the configured driver names. A driver must be both +installed and configured with the driver manager to be included in this list. +Configuring a driver name just sets up a lookup table (e.g. in +odbcinst.ini) to allow users to pass only the driver name to dbConnect().

+

Driver names that are not configured with the driver manager (and thus +do not appear in this function's output) can still be +used in dbConnect() by providing a path to a driver directly.

@@ -68,35 +77,80 @@

Usage

Arguments

-
keep
-

A character vector of driver names to keep in the results, if -NULL (the default) will keep all drivers.

- - -
filter
-

A character vector of driver names to filter from the results, if -NULL (the default) will not filter any drivers.

+
keep, filter
+

A character vector of driver names to keep in or remove +from the results, respectively. If NULL, all driver names will be kept, +or none will be removed, respectively. The odbc.drivers_keep and +odbc.drivers_filter options control the argument defaults.

+

Driver names are first processed with keep, then filter. Thus, if a +driver name is in both keep and filter, it won't appear in output.

Value

-

A data frame with three columns. -If a given driver does not have any attributes the last two columns will be -NA. Drivers can be excluded from being returned by setting the -odbc.drivers.filter option.

name
-

Name of the driver

+

A data frame with three columns.

+ + +
name
+

Name of the driver. The entries in this column can be +passed to the driver argument of dbConnect() (as long as the +driver accepts the argument).

attribute
-

Driver attribute name

+

Driver attribute name.

value
-

Driver attribute value

+

Driver attribute value.

-
+

If a driver has multiple attributes, there will be one row per attribute, +each with the same driver name. If a given driver name does not have any +attributes, the function will return one row with the driver name, but +the last two columns will be NA.

+ +
+

Configuration

+ + +

This function interfaces with the driver manager to collect information +about the available driver names.

+

For MacOS and Linux, the odbc package supports the unixODBC driver +manager. unixODBC looks to the odbcinst.ini configuration file for +information on driver names. Find the location(s) of your odbcinst.ini +file(s) with odbcinst -j.

+

In this example odbcinst.ini file:

+

[MySQL Driver]
+Driver=/opt/homebrew/Cellar/mysql/8.2.0_1/lib/libmysqlclient.dylib

+

Then the driver name is MySQL Driver, which will appear in the name +column of this function's output. To pass the driver name as the driver +argument to dbConnect(), pass it as a string, like "MySQL Driver".

+

Windows is bundled +with an ODBC driver manager.

+

In this example, function output would include 1 row: the name column +would read "MySQL Driver", attribute would be "Driver", and value +would give the file path to the driver. Additional key-value pairs +under the driver name would add additional rows with the same name entry.

+

When a driver is configured with a driver manager, information on the driver +will be automatically passed on to dbConnect() when its driver argument +is set. For an example, see the same section in the odbcListDataSources() +help-file. Instead of configuring driver information with a driver manager, +it is also possible to provide a path to a driver directly to dbConnect().

+
+
+

See also

+ +
+ +
+

Examples

+
if (FALSE) {
+odbcListDrivers()
+}
+
+
diff --git a/dev/search.json b/dev/search.json index cafd0703..f45bdfd8 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":[]},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/ISSUE_TEMPLATE.html","id":"reproducible-example","dir":"","previous_headings":"","what":"Reproducible Example","title":"NA","text":"","code":"devtools::session_info() #> output"},{"path":"https://r-dbi.github.io/odbc/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 odbc authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"current-state","dir":"","previous_headings":"","what":"Current state","title":"NA","text":"odbc stable, though still corner cases issues certain database backends. Mostly around text encodings, datetime logical formats.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"known-outstanding-issues","dir":"","previous_headings":"","what":"Known outstanding issues","title":"NA","text":"https://github.com/r-dbi/odbc/blob/main/setup.md contains instructions running tests locally, important make feedback loop shorter. hardest part maintaining odbc often issue occurs specific database, setting environment database usually takes non-trivial amount time.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"future-directions","dir":"","previous_headings":"","what":"Future directions","title":"NA","text":"Convert using Rcpp using cpp11. urgent, basically r-lib/tidyverse packages converted. Look updating version nanodbc newer version. complicated fact nanodbc now requires C++14, can’t really drop unless want bump odbc require C++14. Alternatively look recent nanodbc comments port current version odbc. use cases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jim Hester. Author. Hadley Wickham. Author, maintainer. Oliver Gjoneski. Author. lexicalunit. Copyright holder. nanodbc library Google Inc.. Copyright holder. cctz library Posit Software, PBC. Copyright holder, funder.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hester J, Wickham H, Gjoneski O (2023). odbc: Connect ODBC Compatible Databases (using DBI Interface). R package version 1.3.5.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/, https://r-dbi.github.io/odbc/.","code":"@Manual{, title = {odbc: Connect to ODBC Compatible Databases (using the DBI Interface)}, author = {Jim Hester and Hadley Wickham and Oliver Gjoneski}, year = {2023}, note = {R package version 1.3.5.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/}, url = {https://r-dbi.github.io/odbc/}, }"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbc","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"goal odbc package provide DBI-compliant interface Open Database Connectivity (ODBC) drivers. allows efficient, easy setup connection database ODBC drivers available, including SQL Server, Oracle, MySQL, PostgreSQL, SQLite others. implementation builds nanodbc C++ library. Windows MacOS Linux - Debian / Ubuntu R Connection Strings DSN Configuration files Table Field information Reading Writing Querying Reading Writing","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Unix MacOS ODBC drivers compiled unixODBC. Drivers compiled iODBC may also work, fully supported. installation driver manager driver, register driver odbcinst.ini file appear odbc::odbcListDrivers(). odbc dependencies use C++11 features. Therefore need gcc 4.8, clang 3.3 Rtools 3.3 later.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"windows","dir":"","previous_headings":"Installation","what":"Windows","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Windows bundled ODBC libraries. However, drivers database need installed separately. Windows ODBC drivers typically include installer needs run install driver proper locations.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos","dir":"","previous_headings":"Installation","what":"MacOS","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"homebrew can used easily install database drivers MacOS.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"unixodbc---required-for-all-databases","dir":"","previous_headings":"Installation > MacOS","what":"UnixODBC - Required for all databases","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the unixODBC library brew install unixodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"common-db-drivers","dir":"","previous_headings":"Installation > MacOS","what":"Common DB drivers","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Microsoft SQL Server ODBC Drivers (Recommended) brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update brew install msodbcsql17 mssql-tools # SQL Server ODBC Drivers (Free TDS) brew install freetds # PostgreSQL ODBC ODBC Drivers brew install psqlodbc # MySQL ODBC Drivers (and database) brew install mysql # SQLite ODBC Drivers brew install sqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"linux---debian--ubuntu","dir":"","previous_headings":"Installation","what":"Linux - Debian / Ubuntu","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"apt-get can used easily install database drivers Linux distributions support , Debian Ubuntu.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"unixodbc---required-for-all-databases-1","dir":"","previous_headings":"Installation > Linux - Debian / Ubuntu","what":"UnixODBC - Required for all databases","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the unixODBC library apt-get install unixodbc unixodbc-dev"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"common-db-drivers-1","dir":"","previous_headings":"Installation > Linux - Debian / Ubuntu","what":"Common DB drivers","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"SQL Server Linux recommended use Microsoft Drivers.","code":"# SQL Server ODBC Drivers (Free TDS) apt-get install tdsodbc # PostgreSQL ODBC ODBC Drivers apt-get install odbc-postgresql # MySQL ODBC Drivers apt-get install libmyodbc # SQLite ODBC Drivers apt-get install libsqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"r","dir":"","previous_headings":"Installation","what":"R","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the latest odbc release from CRAN: install.packages(\"odbc\") # Or the the development version from GitHub: # install.packages(\"pak\") pak::pak(\"r-dbi/odbc\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"connecting-to-a-database","dir":"","previous_headings":"","what":"Connecting to a Database","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Databases can connected specifying connection string directly, DSN configuration files.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"connection-strings","dir":"","previous_headings":"Connecting to a Database","what":"Connection Strings","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Specify connection string named arguments directly dbConnect() method. Alternatively can pass complete connection string .connection_string argument. Connection Strings Reference useful resource example connection strings large variety databases.","code":"library(DBI) con <- dbConnect(odbc::odbc(), driver = \"PostgreSQL Driver\", database = \"test_db\", uid = \"postgres\", pwd = \"password\", host = \"localhost\", port = 5432) library(DBI) con <- dbConnect(odbc::odbc(), .connection_string = \"Driver={PostgreSQL Driver};Uid=postgres;Pwd=password;Host=localhost;Port=5432;Database=test_db;\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"dsn-configuration-files","dir":"","previous_headings":"Connecting to a Database","what":"DSN Configuration files","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC configuration files another option specify connection parameters allow one use Data Source Name (DSN) make easier connect database.","code":"con <- dbConnect(odbc::odbc(), \"PostgreSQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"windows-1","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files","what":"Windows","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC Data Source Administrator application used manage ODBC data sources Windows.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos--linux","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files","what":"MacOS / Linux","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"MacOS Linux two separate text files need edited. UnixODBC includes command line executable odbcinst can used query modify DSN files. However plain text files can also edit hand desired. two different files used setup DSN information. odbcinst.ini - defines driver options odbc.ini - defines connection options DSN configuration files can defined globally users system, often /etc/odbc.ini, /opt/local/etc/odbc.ini /opt/homebrew/etc/odbc.ini, exact location depends option used compiling unixODBC. odbcinst -j can used find exact location. Alternatively ODBCSYSINI environment variable can used specify location configuration files. Ex. ODBCSYSINI=~/ODBC local DSN file can also used files ~/.odbc.ini ~/.odbcinst.ini.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos-aarch64","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"MacOS aarch64","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC trouble locating system data source names, may need override default location ODBC looks configuration files. can use either options specify location DSN configuration files.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"option-1-save-setting-to-renviron","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Create open ~/.Renviron file. Add ODBCSYSINI=/opt/homebrew/etc ~/.Renviron file save changes. Restart open R sessions connecting database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"option-2-set-odbcsysini-environment-variable","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Set ODBCSYSINI environment variable, eg. ODBCSYSINI=/opt/homebrew/etc. Restart open R sessions connecting database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbcinstini","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"odbcinst.ini","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Contains driver information, particularly name driver library. Multiple drivers can specified file. MacOS aarch64 machines, drivers installed via homebrew different location, seen .","code":"[PostgreSQL Driver] Driver = /usr/local/lib/psqlodbcw.so [SQLite Driver] Driver = /usr/local/lib/libsqlite3odbc.dylib [PostgreSQL Driver] Driver = /opt/homebrew/lib/psqlodbcw.so [SQLite Driver] Driver = /opt/homebrew/lib/libsqlite3odbc.dylib"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbcini","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"odbc.ini","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Contains connection information, particularly username, password, database host information. Driver line corresponds driver defined odbcinst.ini. See also: unixODBC without GUI information examples.","code":"[PostgreSQL] Driver = PostgreSQL Driver Database = test_db Servername = localhost UserName = postgres Password = password Port = 5432 [SQLite] Driver = SQLite Driver Database = /tmp/testing"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"following examples assume already created connection con. See Connecting database information establishing connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"table-and-field-information","dir":"","previous_headings":"Usage","what":"Table and Field information","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbListTables() used listing existing tables database.","code":"dbListTables(con) # List tables beginning with f dbListTables(con, table_name = \"f%\") # List all fields in the 'flights' database dbListFields(con, \"flights\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"reading","dir":"","previous_headings":"Usage","what":"Reading","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbReadTable() read full table R data.frame().","code":"data <- dbReadTable(con, \"flights\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"writing","dir":"","previous_headings":"Usage","what":"Writing","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbWriteTable() write R data.frame() SQL table.","code":"dbWriteTable(con, \"iris\", iris)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"querying","dir":"","previous_headings":"Usage","what":"Querying","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbGetQuery() submit query fetch results. also possible submit query fetch separately dbSendQuery() dbFetch(). n= argument dbFetch() can used fetch part query result (next n rows).","code":"result <- dbSendQuery(con, \"SELECT flight, tailnum, origin FROM flights ORDER BY origin\") # Retrieve the first 100 results first_100 <- dbFetch(result, n = 100) # Retrieve the rest of the results rest <- dbFetch(result)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"benchmarks","dir":"","previous_headings":"","what":"Benchmarks","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"odbc package often much faster existing RODBC DBI compatible RODBCDBI packages.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"reading-1","dir":"","previous_headings":"Benchmarks","what":"Reading","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Reading table SQL Server database ‘flights’ dataset (336,776 rows, 19 columns) package nycflights13.","code":"# First using RODBC / RODBCDBI library(DBI) rodbc <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = Sys.getenv(\"SQLSERVER_UID\"), password = Sys.getenv(\"SQLSERVER_PWD\")) system.time(rodbc_result <- dbReadTable(rodbc, \"flights\")) #> user system elapsed #> 13.986 1.173 15.192 # Now using odbc odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", UID = Sys.getenv(\"SQLSERVER_UID\"), PWD = Sys.getenv(\"SQLSERVER_PWD\")) system.time(odbc_result <- dbReadTable(odbc, \"flights\")) #> user system elapsed #> 1.334 0.065 1.406 tibble::as_tibble(odbc_result) #> # A tibble: 336,776 x 19 #> year month day dep_time sched_dep_time dep_delay arr_time #> #> 1 2013 1 1 517 515 2 830 #> 2 2013 1 1 533 529 4 850 #> 3 2013 1 1 542 540 2 923 #> 4 2013 1 1 544 545 -1 1004 #> 5 2013 1 1 554 600 -6 812 #> 6 2013 1 1 554 558 -4 740 #> 7 2013 1 1 555 600 -5 913 #> 8 2013 1 1 557 600 -3 709 #> 9 2013 1 1 557 600 -3 838 #> 10 2013 1 1 558 600 -2 753 #> # … with 336,766 more rows, and 12 more variables: sched_arr_time , #> # arr_delay , carrier , flight , tailnum , #> # origin , dest , air_time , distance , hour , #> # minute , time_hour identical(dim(rodbc_result), dim(odbc_result)) #> [1] TRUE rm(rodbc_result, odbc_result, odbc, rodbc) gc(verbose = FALSE)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"writing-1","dir":"","previous_headings":"Benchmarks","what":"Writing","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Writing dataset database.","code":"library(nycflights13) # rodbc does not support writing timestamps natively, so we remove that column flights2 <- as.data.frame(flights[, names(flights) != \"time_hour\"]) rodbc <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = Sys.getenv(\"SQLSERVER_UID\"), password = Sys.getenv(\"SQLSERVER_PWD\")) system.time(dbWriteTable(rodbc, \"flights2\", flights2)) #> user system elapsed #> 11.891 6.269 765.269 # Now using odbc odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", UID = Sys.getenv(\"SQLSERVER_UID\"), PWD = Sys.getenv(\"SQLSERVER_PWD\")) flights3 <- as.data.frame(flights) system.time(dbWriteTable(odbc, \"flights3\", flights3)) #> user system elapsed #> 2.617 0.275 9.649"},{"path":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"(pre) connection attributes supported can passed part dbConnect call named list attributes parameter:","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"azure_token: string scalar; particular Azure Active Directory authentication token. use Microsoft SQL Server limited support away OEM Microsoft driver.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Connection Methods — OdbcConnection","title":"Odbc Connection Methods — OdbcConnection","text":"Implementations pure virtual functions defined DBI package OdbcConnection objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Connection Methods — OdbcConnection","text":"","code":"# S4 method for OdbcConnection show(object) # S4 method for OdbcConnection dbIsValid(dbObj, ...) # S4 method for OdbcConnection dbDisconnect(conn, ...) # S4 method for OdbcConnection,character dbSendQuery(conn, statement, params = NULL, ..., immediate = FALSE) # S4 method for OdbcConnection,character dbSendStatement(conn, statement, params = NULL, ..., immediate = FALSE) # S4 method for OdbcConnection,ANY dbDataType(dbObj, obj, ...) # S4 method for OdbcConnection,data.frame dbDataType(dbObj, obj, ...) # S4 method for OdbcConnection,character dbQuoteIdentifier(conn, x, ...) # S4 method for OdbcConnection,SQL dbQuoteIdentifier(conn, x, ...) # S4 method for OdbcConnection,character dbRemoveTable(conn, name, ...) # S4 method for OdbcConnection dbGetInfo(dbObj, ...) # S4 method for OdbcConnection,character dbGetQuery(conn, statement, n = -1, params = NULL, ...) # S4 method for OdbcConnection dbBegin(conn, ...) # S4 method for OdbcConnection dbCommit(conn, ...) # S4 method for OdbcConnection dbRollback(conn, ...) # S4 method for OdbcConnection,Id dbExistsTable(conn, name, ...) # S4 method for OdbcConnection,SQL dbExistsTable(conn, name, ...) # S4 method for OdbcConnection,character dbExistsTable(conn, name, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Connection Methods — OdbcConnection","text":"object R object dbObj object inheriting DBIObject, .e. DBIDriver, DBIConnection, DBIResult ... arguments methods. conn DBIConnection object, returned dbConnect(). statement character string containing SQL. params Query parameters pass dbBind(), See dbBind() details. immediate TRUE, SQLExecDirect used instead SQLPrepare, params argument ignored obj R object whose SQL type want determine. x character vector, SQL Id object quote identifier. name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Driver Methods — OdbcDriver","title":"Odbc Driver Methods — OdbcDriver","text":"Implementations pure virtual functions defined DBI package OdbcDriver objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Driver Methods — OdbcDriver","text":"","code":"# S4 method for OdbcDriver show(object) # S4 method for OdbcDriver,ANY dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver,list dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver,data.frame dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver dbIsValid(dbObj, ...) # S4 method for OdbcDriver dbGetInfo(dbObj, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Driver Methods — OdbcDriver","text":"object R object dbObj object inheriting DBIDriver DBIConnection obj R object whose SQL type want determine. ... arguments passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Result Methods — OdbcResult","title":"Odbc Result Methods — OdbcResult","text":"Implementations pure virtual functions defined DBI package OdbcResult objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Result Methods — OdbcResult","text":"","code":"# S4 method for OdbcResult dbClearResult(res, ...) # S4 method for OdbcResult dbFetch(res, n = -1, ...) # S4 method for OdbcResult dbHasCompleted(res, ...) # S4 method for OdbcResult dbIsValid(dbObj, ...) # S4 method for OdbcResult dbGetStatement(res, ...) # S4 method for OdbcResult dbColumnInfo(res, ...) # S4 method for OdbcResult dbGetRowCount(res, ...) # S4 method for OdbcResult dbGetRowsAffected(res, ...) # S4 method for OdbcResult dbBind(res, params, ..., batch_rows = getOption(\"odbc.batch_rows\", NA))"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Result Methods — OdbcResult","text":"res object inheriting DBIResult. ... arguments passed methods. n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values. dbObj object inheriting DBIObject, .e. DBIDriver, DBIConnection, DBIResult params list bindings, named unnamed. batch_rows number rows retrieve. Defaults NA, set dynamically size input. Depending database, driver, dataset free memory setting lower value may improve performance.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"SQL Server, conn@quote return quotation mark, however quotation marks well square bracket used interchangeably delimited identifiers. See: https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers?view=sql-server-ver16 Therefore strip brackets first, call DBI method strips quotation marks. TODO: generic implementation DBI take quote char parameter. Local temp tables stored [tempdb].[dbo].[#name]________(padding using underscores)[numeric identifier] can identify name local temp table adjust identifier query appropriately. warn user temporary set TRUE table name conform local temp table naming conventions. writing global temp table, user set temporary flag TRUE.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"conn DBIConnection object, returned dbConnect(). x SQL Id object. ... arguments passed methods. name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') con database connection. table table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') fields Either character vector data frame. named character vector: Names column names, values types. Names escaped dbQuoteIdentifier(). Field types unescaped. data frame: field types generated using dbDataType(). row.names Either TRUE, FALSE, NA string. TRUE, always translate row names column called \"row_names\". FALSE, never translate row names. NA, translate rownames character vector. string equivalent TRUE, allows override default name. backward compatibility, NULL equivalent FALSE. temporary TRUE, generate temporary table statement.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"dbExistsTable() returns logical scalar, TRUE table view specified name argument exists, FALSE otherwise. includes temporary tables supported database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"True : catalog_name supplied must equal \"temdb\" \"%\" ( wildcard ) Name must start \"#\" followd non-\"#\" character Note, implementation assumes metadata attribute set catalog functions accept wildcard entries. Driver note. OEM driver return correctly name, catalog_name = \"tempdb\" circumstances. exmaple name underscores beginwith. FreeTDS, index table correctly unless name adjusted ( allowed trailing wildcards accomodate trailing underscores postfix ). Therefore, cases query name___%. cases simple CREATE TABLE statement used / table identifier differentiator ( viz--viz creating non-temp table ).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"error raised calling method closed invalid connection. error also raised name processed dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbExistsTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call dbQuoteIdentifier(): quoting done tables listed dbListTables(), dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbExistsTable(con, \"iris\") #> [1] FALSE dbWriteTable(con, \"iris\", iris) dbExistsTable(con, \"iris\") #> [1] TRUE dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper for Connecting to Databricks via ODBC — databricks","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"Connect Databricks clusters SQL warehouses via Databricks ODBC driver. particular, custom dbConnect() method Databricks ODBC driver implements subset Databricks client unified authentication model, support personal access tokens, OAuth machine--machine credentials, OAuth user--machine credentials supplied via Posit Workbench Databricks CLI desktop. credentials detected automatically present using standard environment variables.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"","code":"databricks() # S4 method for DatabricksOdbcDriver dbConnect( drv, httpPath, workspace = Sys.getenv(\"DATABRICKS_HOST\"), useNativeQuery = TRUE, driver = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"drv object inherits DBIDriver, existing DBIConnection object (order clone existing connection). httpPath query cluster, use HTTP Path value found Advanced Options > JDBC/ODBC Databricks UI. SQL warehouses, found Connection Details instead. workspace URL Databricks workspace, e.g. \"https://example.cloud.databricks.com\". useNativeQuery Suppress driver's conversion ANSI SQL 92 HiveSQL? default (TRUE), gives greater performance means paramterised queries (hence dbWriteTable()) work. driver name Databricks ODBC driver, NULL use default name. ... arguments passed dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"OdbcConnection object active connection Databricks cluster SQL warehouse.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"","code":"if (FALSE) { DBI::dbConnect( odbc::databricks(), httpPath = \"sql/protocolv1/o/4425955464597947/1026-023828-vn51jugj\" ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"method invoked DBI::dbConnect() called first argument odbc().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"","code":"# S4 method for OdbcDriver dbConnect( drv, dsn = NULL, ..., timezone = \"UTC\", timezone_out = \"UTC\", encoding = \"\", bigint = c(\"integer64\", \"integer\", \"numeric\", \"character\"), timeout = 10, driver = NULL, server = NULL, database = NULL, uid = NULL, pwd = NULL, dbms.name = NULL, attributes = NULL, .connection_string = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"drv OdbcDriver, odbc(). dsn data source name. currently available options, see name column odbcListDataSources() output. ... Additional ODBC keywords. joined arguments form final connection string. Note generic ODBC parameter names, values drv dsn, case-insensitive. case-sensitivity values generic arguments, well names values driver-specific arguments, determined driver drv. timezone server time zone. Useful database internal timezone 'UTC'. database local timezone, set argument Sys.timezone(). See OlsonNames() complete list available time zones system. timezone_out time zone returned R. want display datetime values local timezone, set Sys.timezone(). encoding text encoding used Database. database using UTF-8 need set encoding get accurate re-encoding. See iconvlist() complete list available encodings system. Note strings always returned UTF-8 encoded. bigint R type SQL_BIGINT types mapped . Default bit64::integer64, allows full range 64 bit integers. timeout Time seconds timeout connection attempt. Setting timeout Inf indicates timeout. Defaults 10 seconds. driver ODBC driver name path driver. currently available options, see name column odbcListDrivers() output. server server hostname. drivers use Servername name argument. required configured supplied dsn. database database server. required configured supplied dsn. uid user identifier. drivers use username name argument. required configured supplied dsn. pwd password. drivers use password name argument. required configured supplied dsn. dbms.name database management system name. normally queried automatically ODBC driver. name used class name OdbcConnection object returned dbConnect(). However, driver return valid value, can set manually parameter. attributes S4 object connection attributes passed prior connection established. See ConnectionAttributes. .connection_string complete connection string, useful copy pasting another source. argument used, additional arguments appended string.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"connection string keywords driver dependent. parameters documented common, drivers may accept . Please see specific driver documentation allowed parameters; https://www.connectionstrings.com also useful resource example connection strings variety databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List field names of a remote table — dbListFields,OdbcConnection,character-method","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"Returns field names remote table character vector.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"methods-in-other-packages","dir":"Reference","previous_headings":"","what":"Methods in other packages","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"documentation page describes generics. Refer documentation pages linked documentation methods implemented various backend packages. odbc::dbListFields(\"OdbcConnection\", \"character\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"","code":"# S4 method for OdbcConnection,character dbListFields( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"conn DBIConnection object, returned dbConnect(). name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') catalog_name name catalog return, default returns catalogs. schema_name name schema return, default returns schemas. column_name name column return, default returns columns. ... parameters passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"dbListFields() returns character vector enumerates fields table correct order. also works temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"% can used wildcard search parameters match 0 characters. _ can used match single character.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"table exist, error raised. Invalid types name argument (e.g., character length equal one, numeric) lead error. error also raised calling method closed invalid connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"name argument can string return value dbQuoteIdentifier() value table column return value dbListObjects() is_prefix FALSE column named row_names treated like column.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbWriteTable(con, \"mtcars\", mtcars) dbListFields(con, \"mtcars\") #> [1] \"mpg\" \"cyl\" \"disp\" \"hp\" \"drat\" \"wt\" \"qsec\" \"vs\" \"am\" \"gear\" #> [11] \"carb\" dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List remote tables — dbListTables,OdbcConnection-method","title":"List remote tables — dbListTables,OdbcConnection-method","text":"Returns unquoted names remote tables accessible connection. include views temporary objects, database backends (particular RMariaDB RMySQL) support .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"methods-in-other-packages","dir":"Reference","previous_headings":"","what":"Methods in other packages","title":"List remote tables — dbListTables,OdbcConnection-method","text":"documentation page describes generics. Refer documentation pages linked documentation methods implemented various backend packages. odbc::dbListTables(\"OdbcConnection\") RSQLite::dbListTables(\"SQLiteConnection\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List remote tables — dbListTables,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection dbListTables( conn, catalog_name = NULL, schema_name = NULL, table_name = NULL, table_type = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List remote tables — dbListTables,OdbcConnection-method","text":"conn DBIConnection object, returned dbConnect(). catalog_name name catalog return, default returns catalogs. schema_name name schema return, default returns schemas. table_name name table return, default returns tables. table_type type table return, default returns table types. ... parameters passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List remote tables — dbListTables,OdbcConnection-method","text":"dbListTables() returns character vector enumerates tables views database. Tables added dbWriteTable() part list. soon table removed database, also removed list database tables. applies temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List remote tables — dbListTables,OdbcConnection-method","text":"% can used wildcard search parameters match 0 characters. _ can used match single character.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"List remote tables — dbListTables,OdbcConnection-method","text":"error raised calling method closed invalid connection.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List remote tables — dbListTables,OdbcConnection-method","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbListTables(con) #> character(0) dbWriteTable(con, \"mtcars\", mtcars) dbListTables(con) #> [1] \"mtcars\" dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","title":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","text":"~~ Methods function dbListTables package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","text":"signature(conn = \"Teradata\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbQuoteString-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","title":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","text":"~~ Methods function dbQuoteString package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbQuoteString-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","text":"signature(conn = \"DBIConnection\", x = \"\") signature(conn = \"DBIConnection\", x = \"character\") signature(conn = \"DBIConnection\", x = \"SQL\") signature(conn = \"Hive\", x = \"character\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"Currently implemented select back-ends use (SQL Server, example). Generic, case develop broader use case.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"","code":"isTempTable(conn, name, ...) # S4 method for OdbcConnection,Id isTempTable(conn, name, ...) # S4 method for OdbcConnection,SQL isTempTable(conn, name, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"conn OdbcConnection name Table name ... additional parameters methods","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-package.html","id":null,"dir":"Reference","previous_headings":"","what":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","title":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","text":"DBI-compatible interface ODBC databases.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","text":"Maintainer: Hadley Wickham hadley@posit.co Authors: Jim Hester Oliver Gjoneski contributors: lexicalunit (nanodbc library) [copyright holder] Google Inc. (cctz library) [copyright holder] Posit Software, PBC [copyright holder, funder]","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Convenience functions for reading/writing DBMS tables — odbc-tables","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"Convenience functions reading/writing DBMS tables","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"","code":"# S4 method for OdbcConnection,character,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection,Id,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection,SQL,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection dbAppendTable(conn, name, value, ..., row.names = NULL) # S4 method for OdbcConnection sqlData(con, value, row.names = NA, ...) # S4 method for OdbcConnection sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"conn OdbcConnection object, produced DBI::dbConnect() name character string specifying table name. Names automatically quoted can use sequence characters, just valid bare table name. value data.frame write database. overwrite Allow overwriting destination table. TRUE append also TRUE. append Allow appending destination table. TRUE overwrite also TRUE. temporary TRUE, generate temporary table statement. row.names Either TRUE, FALSE, NA string. TRUE, always translate row names column called \"row_names\". FALSE, never translate row names. NA, translate rownames character vector. string equivalent TRUE, allows override default name. backward compatibility, NULL equivalent FALSE. field.types Additional field types used override derived types. batch_rows number rows retrieve. Defaults NA, set dynamically size input. Depending database, driver, dataset free memory setting lower value may improve performance. ... arguments used individual methods. con database connection. table table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') fields Either character vector data frame. named character vector: Names column names, values types. Names escaped dbQuoteIdentifier(). Field types unescaped. data frame: field types generated using dbDataType().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"","code":"if (FALSE) { library(DBI) con <- dbConnect(odbc::odbc()) dbListTables(con) dbWriteTable(con, \"mtcars\", mtcars, temporary = TRUE) dbReadTable(con, \"mtcars\") dbListTables(con) dbExistsTable(con, \"mtcars\") # A zero row data frame just creates a table definition. dbWriteTable(con, \"mtcars2\", mtcars[0, ], temporary = TRUE) dbReadTable(con, \"mtcars2\") dbDisconnect(con) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc driver — odbc","title":"Odbc driver — odbc","text":"Driver ODBC database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc driver — odbc","text":"","code":"odbc()"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Odbc driver — odbc","text":"","code":"if (FALSE) { #' library(DBI) odbc::odbc() }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":null,"dir":"Reference","previous_headings":"","what":"List the actions supported for the connection — odbcConnectionActions","title":"List the actions supported for the connection — odbcConnectionActions","text":"Return list actions can performed connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the actions supported for the connection — odbcConnectionActions","text":"","code":"odbcConnectionActions(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the actions supported for the connection — odbcConnectionActions","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the actions supported for the connection — odbcConnectionActions","text":"named list actions can performed connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List the actions supported for the connection — odbcConnectionActions","text":"list returned named list actions, action following properties: callback function invoked perform action icon optional path icon representing action","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionCatalogs — odbcConnectionCatalogs","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"function returns listing available catalogs.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"","code":"odbcConnectionCatalogs(conn) # S4 method for OdbcConnection odbcConnectionCatalogs(conn)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"conn OdbcConnection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionColumns — odbcConnectionColumns","title":"odbcConnectionColumns — odbcConnectionColumns","text":"given table function returns detailed information fields / columns. expectation relatively thin wrapper around ODBC SQLColumns function call, field names renamed / re-ordered according return specifications .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionColumns — odbcConnectionColumns","text":"","code":"odbcConnectionColumns(conn, name, ...) # S4 method for OdbcConnection,Id odbcConnectionColumns(conn, name, column_name = NULL) # S4 method for OdbcConnection,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL ) # S4 method for OdbcConnection,SQL odbcConnectionColumns(conn, name, ...) # S4 method for Oracle,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionColumns — odbcConnectionColumns","text":"conn OdbcConnection name table wish get information ... additional parameters methods column_name name column return, default returns columns. catalog_name character catalog table located schema_name character schema table located","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"odbcConnectionColumns — odbcConnectionColumns","text":"data.frame columns name field.type - equivalent type_name SQLColumns output table_name schema_name catalog_name data_type column_size buffer_length decimal_digits numeric_precision_radix column_default sql_data_type sql_datetime_subtype char_octet_length ordinal_position nullable","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionColumns — odbcConnectionColumns","text":"dbWriteTable() make call method get details fields table writing . particular columns data_type, column_size, decimal_digits used. implementation necessary dbWriteTable() work. odbcConnectionColumns routed SQLColumns ODBC method. function, together remaining catalog functions (SQLTables, etc), default ( SQL_ATTR_METADATA_ID == false ) expect either ordinary arguments (OA) case catalog, pattern value arguments (PV) case schema/table name. , quoted identifiers make sense, unquote identifiers prior call. Query, rather use SQLColumns ODBC API ORACLE since using API bind BIGINT one column results. Oracle's OEM driver unable handle.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":null,"dir":"Reference","previous_headings":"","what":"Get an icon representing a connection. — odbcConnectionIcon","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"Return path disk icon representing connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"","code":"odbcConnectionIcon(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"path icon file disk.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"icon returned 32x32 square image file.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionSchemas — odbcConnectionSchemas","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"function returns listing available schemas.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"","code":"odbcConnectionSchemas(conn, catalog_name) # S4 method for OdbcConnection,ANY odbcConnectionSchemas(conn, catalog_name = NULL) # S4 method for OdbcConnection,character odbcConnectionSchemas(conn, catalog_name)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"conn OdbcConnection catalog_name Catalog looking list schemas.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"Currently, generic connection catalog_name argument ignored. Databricks supports multiple catalogs. hand, default implementation odbcConnectionSchemas routes SQLTables likely enumerate schemas currently active catalog . implementation respect catalog_name arrgument.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionTableTypes — odbcConnectionTableTypes","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"function returns listing table types available database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"","code":"odbcConnectionTableTypes(conn) # S4 method for OdbcConnection odbcConnectionTableTypes(conn)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"conn OdbcConnection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionTables — odbcConnectionTables","title":"odbcConnectionTables — odbcConnectionTables","text":"function returns listing tables accessible connected user. expectation relatively thin wrapper around ODBC SQLTables function call, albeit returning subset fields.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionTables — odbcConnectionTables","text":"","code":"odbcConnectionTables(conn, name, ...) # S4 method for OdbcConnection,Id odbcConnectionTables(conn, name, table_type = NULL) # S4 method for OdbcConnection,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL ) # S4 method for OdbcConnection,ANY odbcConnectionTables( conn, name = NULL, catalog_name = NULL, schema_name = NULL, table_type = NULL ) # S4 method for OdbcConnection,SQL odbcConnectionTables(conn, name, table_type = NULL) # S4 method for Oracle,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionTables — odbcConnectionTables","text":"conn OdbcConnection name table wish search ... additional parameters methods table_type List tables type, example 'VIEW'. See odbcConnectionTableTypes listing available table types connection. catalog_name character catalog wish query available tables schema_name character schema wish query available tables.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"odbcConnectionTables — odbcConnectionTables","text":"data.frame columns table_catalog table_schema table_name table_remarks","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionTables — odbcConnectionTables","text":"important note , similar ODBC/API call, method also accomodates pattern-value arguments catalog, schema, table name arguments. extending method, aware package:odbc internally uses method satisfy DBI::dbListTables DBI::dbExistsTable methods. ( former also advertises pattern value arguments ) Query, rather use SQLTables ODBC API performance reasons Oracle. Main functional difference implementation SQLTables ( OEM driver ) query OEM implementation also looks synonyms. Given performance reports, sacrifice synonym look-better execution time.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the corresponding ODBC data type for an R object — odbcDataType","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"used creating new table dbWriteTable(). Databases default methods defined MySQL PostgreSQL SQL Server Oracle SQLite Spark Hive Impala Redshift Vertica BigQuery Teradata Access","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"","code":"odbcDataType(con, obj, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"con driver connection object, returned dbConnect(). obj R object. ... Additional arguments passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"Corresponding SQL type obj.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"using different database dbWriteTable() fails SQL parsing error default method appropriate, need write new method.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"defining-a-new-dbdatatype-method","dir":"Reference","previous_headings":"","what":"Defining a new dbDataType method","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"object type connection database name retrieved dbGetInfo(con)$dbms.name. Use documentation provided database determine appropriate values R data type. example method definition fictional foo database follows.","code":"con <- dbConnect(odbc::odbc(), \"FooConnection\") dbGetInfo(con)$dbms.name #> [1] \"foo\" `odbcDataType.foo <- function(con, obj, ...) { switch_type(obj, factor = \"VARCHAR(255)\", datetime = \"TIMESTAMP\", date = \"DATE\", binary = \"BINARY\", integer = \"INTEGER\", double = \"DOUBLE\", character = \"VARCHAR(255)\", logical = \"BIT\", list = \"VARCHAR(255)\", stop(\"Unsupported type\", call. = FALSE) ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":null,"dir":"Reference","previous_headings":"","what":"List columns in an object. — odbcListColumns","title":"List columns in an object. — odbcListColumns","text":"Lists names types column (field) specified object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List columns in an object. — odbcListColumns","text":"","code":"odbcListColumns(connection, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List columns in an object. — odbcListColumns","text":"connection connection object, returned dbConnect(). ... Parameters specifying object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List columns in an object. — odbcListColumns","text":"data frame name type columns, listing object's fields.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List columns in an object. — odbcListColumns","text":"object inspect must specified one arguments (e.g. table = \"employees\"); depending driver underlying data store, additional specification arguments may required.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":null,"dir":"Reference","previous_headings":"","what":"List Available Data Source Names — odbcListDataSources","title":"List Available Data Source Names — odbcListDataSources","text":"List available data sources system. See DSN Configuration files section package README details install data sources common databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List Available Data Source Names — odbcListDataSources","text":"","code":"odbcListDataSources()"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List Available Data Source Names — odbcListDataSources","text":"data frame two columns. name Name data source description Data Source description","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":null,"dir":"Reference","previous_headings":"","what":"List Available ODBC Drivers — odbcListDrivers","title":"List Available ODBC Drivers — odbcListDrivers","text":"List available drivers system. See Installation section package README details install drivers common databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List Available ODBC Drivers — odbcListDrivers","text":"","code":"odbcListDrivers( keep = getOption(\"odbc.drivers_keep\"), filter = getOption(\"odbc.drivers_filter\") )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List Available ODBC Drivers — odbcListDrivers","text":"keep character vector driver names keep results, NULL (default) keep drivers. filter character vector driver names filter results, NULL (default) filter drivers.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List Available ODBC Drivers — odbcListDrivers","text":"data frame three columns. given driver attributes last two columns NA. Drivers can excluded returned setting odbc.drivers.filter option. name Name driver attribute Driver attribute name value Driver attribute value","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"Lists object types metadata known connection, object types relate .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"","code":"odbcListObjectTypes(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"hierarchy object types supported connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"returned hierarchy takes form nested list, object type supported connection named list following attributes: contains list object types contained object, \"data\" object contains data icon optional path icon representing type instance, connection top-level object schema contains tables views, function return list like following:","code":"list(schema = list(contains = list( list(name = \"table\", contains = \"data\") list(name = \"view\", contains = \"data\"))))"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":null,"dir":"Reference","previous_headings":"","what":"List objects in a connection. — odbcListObjects","title":"List objects in a connection. — odbcListObjects","text":"Lists objects connection, objects specific attributes.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List objects in a connection. — odbcListObjects","text":"","code":"odbcListObjects(connection, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List objects in a connection. — odbcListObjects","text":"connection connection object, returned dbConnect(). ... Attributes filter .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List objects in a connection. — odbcListObjects","text":"data frame name type columns, listing objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List objects in a connection. — odbcListObjects","text":"used without parameters, function returns objects known connection. parameters passed filter list objects given attributes; instance, passing schema = \"foo\" return objects matching schema foo.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":null,"dir":"Reference","previous_headings":"","what":"Preview the data in an object. — odbcPreviewObject","title":"Preview the data in an object. — odbcPreviewObject","text":"Return data inside object data frame.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preview the data in an object. — odbcPreviewObject","text":"","code":"odbcPreviewObject(connection, rowLimit, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preview the data in an object. — odbcPreviewObject","text":"connection connection object, returned dbConnect(). rowLimit maximum number rows display. ... Parameters specifying object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preview the data in an object. — odbcPreviewObject","text":"data frame containing data object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Preview the data in an object. — odbcPreviewObject","text":"object previewed must specified one arguments (e.g. table = \"employees\"); depending driver underlying data store, additional specification arguments may required.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a preview query. — odbcPreviewQuery","title":"Create a preview query. — odbcPreviewQuery","text":"Optimize rowLimit argument. S3 since back-ends parse LIMIT syntax. Internal, expected users interact method.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a preview query. — odbcPreviewQuery","text":"","code":"odbcPreviewQuery(connection, rowLimit, name) # S3 method for OdbcConnection odbcPreviewQuery(connection, rowLimit, name) # S3 method for `Microsoft SQL Server` odbcPreviewQuery(connection, rowLimit, name) # S3 method for Oracle odbcPreviewQuery(connection, rowLimit, name)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a preview query. — odbcPreviewQuery","text":"connection connection object, returned dbConnect(). rowLimit maximum number rows display. name Name object previewed","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"Set Transaction Isolation Level Connection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"","code":"odbcSetTransactionIsolationLevel(conn, levels)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"conn DBIConnection object, returned dbConnect(). levels One ‘read_uncommitted’, ‘read_committed’, ‘repeatable_read’, ‘serializable’ .","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"","code":"if (FALSE) { # Can use spaces or underscores in between words. odbcSetTransactionIsolationLevel(con, \"read uncommitted\") # Can also use the full constant name. odbcSetTransactionIsolationLevel(con, \"SQL_TXN_READ_UNCOMMITTED\") }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/sqlCreateTable-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","title":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","text":"~~ Methods function sqlCreateTable package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/sqlCreateTable-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","text":"signature(con = \"DB2/AIX64\") signature(con = \"DBIConnection\") signature(con = \"HDB\") signature(con = \"Oracle\") signature(con = \"Teradata\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"test-setup","dir":"","previous_headings":"","what":"Test Setup","title":"Oracle","text":"file contains settings needed setup local testing odbc. useful someone trying develop R package, can run unit tests locally.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"postgresql-and-mysql","dir":"","previous_headings":"","what":"PostgreSQL and MySQL","title":"Oracle","text":"Run locally brew services start mysql brew services start postgres Create ‘test’ database ‘postgres’ user ‘password’ password. See configuration files .github/odbc examples.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"sql-server-test-setup","dir":"","previous_headings":"","what":"SQL Server test setup","title":"Oracle","text":"Install microsoft drivers","code":"brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update brew install msodbcsql17 mssql-tools"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"ini-files","dir":"","previous_headings":"SQL Server test setup","what":"ini files","title":"Oracle","text":"First need install drivers setup ini files odbc.ini need start instance SQL Server docker container. configuration server add testuser create test database","code":"[MicrosoftSQLServer] driver = ODBC Driver 17 for SQL Server Server = 127.0.0.1 port = 1433 docker run -e \"ACCEPT_EULA=Y\" -e \"SA_PASSWORD=Password12\" \\ -p 1433:1433 --name sql1 \\ -d mcr.microsoft.com/mssql/server:2017-latest library(DBI); con <- dbConnect(odbc::odbc(), \"SQLServer\", UID = 'SA', PWD = 'Password12') # Add a test user, but currently unused dbExecute(con, \"USE test\") dbExecute(con, \"EXEC sp_configure 'contained database authentication', 1\") dbExecute(con, \"RECONFIGURE\") dbExecute(con, \"alter database test set containment = partial\") dbExecute(con, \"CREATE USER testuser with password = 'Password12'\") dbExecute(con, \"GRANT CONTROL TO testuser\") dbExecute(con, \"DROP USER testuser\") # Create a test database dbExecute(con, \"CREATE DATABASE test\")"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"rodbc","dir":"","previous_headings":"SQL Server test setup","what":"RODBC","title":"Oracle","text":"need install RODBC benchmarking README. CRAN version RODBC uses iODBC, use unixODBC need recompile source, specifying odbc manager explicitly.","code":"install.packages(\"RODBC\", type = \"source\", INSTALL_opts=\"--configure-args='--with-odbc-manager=odbc'\")"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"linux","dir":"","previous_headings":"","what":"Linux","title":"Oracle","text":"Create docker container docker","code":"docker run -v \"$(pwd)\":\"/opt/$(basename $(pwd))\":delegated --security-opt=seccomp:unconfined --link sql1 -it rstudio/r-base:3.6.1-bionic /bin/bash curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - #Ubuntu 18.04 curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list apt-get update ACCEPT_EULA=Y apt-get install -y msodbcsql17 apt-get install -y unixodbc-dev [MicrosoftSQLServer] driver = ODBC Driver 17 for SQL Server Server = sql1 port = 1433 Database = test"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":null,"dir":"","previous_headings":"","what":"Oracle","title":"Oracle","text":"huge pain.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"get-the-db-container","dir":"","previous_headings":"","what":"Get the DB container","title":"Oracle","text":"","code":"docker login docker pull store/oracle/database-enterprise:12.2.0.1"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"start-the-container","dir":"","previous_headings":"","what":"Start the container","title":"Oracle","text":"-P important setup port forwarding docker container","code":"docker run -d -it --name oracle_db -P store/oracle/database-enterprise:12.2.0.1"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"query-the-port-and-edit-the-ports-in-tnsnamesora","dir":"","previous_headings":"","what":"Query the port and edit the ports in tnsnames.ora","title":"Oracle","text":"Contents snsnames.ora Set current working directory ","code":"docker port oracle_db ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=32769)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain))) ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=32769)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"add-a-new-user-to-the-db","dir":"","previous_headings":"","what":"Add a new user to the DB","title":"Oracle","text":"docker exec -oracle_db bash -c “source /home/oracle/.bashrc; sqlplus SYS/Oradoc_db1 SYSDBA”","code":"alter session set \"_ORACLE_SCRIPT\"=true; create user test identified by 12345; GRANT ALL PRIVILEGES TO TEST; Sys.setenv(\"TNS_ADMIN\" = getwd()) con <- dbConnect(odbc::odbc(), \"OracleODBC-19\")"},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-development-version","dir":"Changelog","previous_headings":"","what":"odbc (development version)","title":"odbc (development version)","text":"Spark SQL: Correctly enumerate schemas away current catalog (@detule, #614) Modify odbcDataType.Snowflake better reflect Snowflake Data Types documentation (@meztez, #599). SQL Server: Specialize syntax sqlCreateTable avoid failures writing (new) local temp tables. (@detule, #601) SQL Server: Improved handling local temp tables dbWrite, dbAppendTable, dbExistTable (@detule, #600) Teradata: Improved handling temp tables (@detule @But2ene, #589, 590) Oracle: Fix regression falling back odbcConnectionColumns describe column data types (@detule, #587) Add new, specialised odbc::databricks() class dbConnect() method make using Databricks’s ODBC driver easier (@atheriel, #615). Increased minimum required R version 3.2.0 3.6.0 (@simonpcouch, #629). Add support searching multiple paths default location Databricks driver (@bschwedler, #621).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-135","dir":"Changelog","previous_headings":"","what":"odbc 1.3.5","title":"odbc 1.3.5","text":"CRAN release: 2023-06-29 Various fixes R CMD check. argument order sqlCreateTable() methods avoiding weird argument mismatch problems (#448). Fixed truncation retrieving unicode data stored VAR/CHAR columns (@detule, #553). Fixed issue related fetching zero rows (@detule, #528). Backend specific improvements: MYSQL: Fixed retrieving results stored procedures (@detule, #435). Oracle: performance enhancements (#577) Spark: Changed data type date-times DATE TIMESTAMP (@schuemie, #555).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-134","dir":"Changelog","previous_headings":"","what":"odbc 1.3.4","title":"odbc 1.3.4","text":"CRAN release: 2023-01-17 Optimized table preview methods. Enhances large table preview within RStudio IDE (@detule, #525). Added attributes parameter dbConnect(...). Can used pass token authenticate Azure AD using Microsoft SQL Server. Documented ?ConnectionAttributes (@detule, #521). Fix length(x) = 3 > 1' coercion 'logical(1) warning connection observer (@meztez, #494).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-133","dir":"Changelog","previous_headings":"","what":"odbc 1.3.3","title":"odbc 1.3.3","text":"CRAN release: 2021-11-30 Hadley Wickham now maintainer.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-132","dir":"Changelog","previous_headings":"","what":"odbc 1.3.2","title":"odbc 1.3.2","text":"CRAN release: 2021-04-03 New odbcDataType.Snowflake() method Snowflake databases. (@edgararuiz, #451)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-131","dir":"Changelog","previous_headings":"","what":"odbc 1.3.1","title":"odbc 1.3.1","text":"CRAN release: 2021-03-16 Fixed warnings anonymous unions (@detule, #440) Fixed invalid descriptor issues retrieving results SQL Server + Microsoft’s ODBC driver, using parametrized queries. (@detule, #414) Fixed null handling SQL Server / Azure result sets retrieved Microsoft’s ODBC driver. (@detule, #408) Hive uses C-style escaping string literals (single quotes backslash-escaped, note single quote-escaped). dbQuoteString now respects called connection class Hive. (@rnorberg, #184) calling sqlCreateTable(con, ..., temporary = TRUE) con connection class DB2/AIX64, CREATE TABLE statement generated properly creates temporary table DB2. statement begins DECLARE GLOBAL TEMPORARY TABLE ends COMMIT PRESERVE ROWS (DB2’s default behavior COMMIT DELETE ROWS, results inserted data deleted soon dbWriteTable completes). (@rnorberg, #426) Fixed RStudio Connections Pane working database one catalog one schema. (@meztez, #444)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-130","dir":"Changelog","previous_headings":"","what":"odbc 1.3.0","title":"odbc 1.3.0","text":"CRAN release: 2020-10-27","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"major-changes-1-3-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"odbc 1.3.0","text":"odbc can now compiled Rtools35 (gcc 4.9.3) Windows (#383) invalid descriptor errors drivers Microsoft SQLServer driver freeTDS driver support order retrieval now avoided. done unbinding nanodbc buffer past long column. Performance unbound columns cases reduced, retrieval work without error (@detule, #381) dbBind() dbFetch() now support multiple result sets (@vkapartzianis, #345)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"minor-improvements-and-fixes-1-3-0","dir":"Changelog","previous_headings":"","what":"Minor improvements and fixes","title":"odbc 1.3.0","text":"New dbAppendTable() method OdbcConnection objects (#335) dbQuoteIdentifier() now uses input names (). dbWriteTable() dbBind() now default batch_rows NA, sets batch size length input. avoids problems drivers don’t support batch sizes larger input size. restore behavior prior release pass batch_rows = 1024 set options(odbc.batch_rows = 1024) (#391). dbWriteTable() now handles data.table::IDate() objects (#388) dbWriteTable(field.types=) now issues warning rather error missing columns (#342) odbcConnectionColumns() now works intended DBI::Id() objects (#389) dbFetch() now verifies n valid input. Dates now always interpreted database’s local time zone, regardless timezone parameter (#398) Oracle connections now support Date POSIXct types via DATE TIMESTAMP data types (#324, #349, #350) Oracle connections now use VARCHAR2 rather VARCHAR, recommended Oracle’s documentation (#189)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-123","dir":"Changelog","previous_headings":"","what":"odbc 1.2.3","title":"odbc 1.2.3","text":"CRAN release: 2020-06-18 dbWriteTable() now executes immediately, fixes issues temporary tables FreeTDS SQL Server driver (@krlmlr). blob roundtrips now work cases (#364, @krlmlr). BH dependency removed (#326)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-122","dir":"Changelog","previous_headings":"","what":"odbc 1.2.2","title":"odbc 1.2.2","text":"CRAN release: 2020-01-10 configure script now uses iodbc-config macOS, available. Fix errors drivers fully implement SQLGetInfo (#325).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-121","dir":"Changelog","previous_headings":"","what":"odbc 1.2.1","title":"odbc 1.2.1","text":"CRAN release: 2019-12-05 Fix unicode character width issues macOS odbc CRAN binary. (#283) configure script now works systems whose /bin/sh support command substitution, Solaris 10.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-120","dir":"Changelog","previous_headings":"","what":"odbc 1.2.0","title":"odbc 1.2.0","text":"CRAN release: 2019-11-28","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-2-0","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.2.0","text":"sqlCreateTable() dbWriteTable() now throw error mistakenly include field.types names exist input data. (#271) error message trying write tables unsupported types now includes column name (#238). dbConnect() now new param timezone_out useful user wants datetime values marked specific timezone instead UTC (@shrektan, #294). dbGetQuery(), dbSendQuery() dbSendStatement() gain immediate argument execute statement query immediately instead preparing, executing statement. (#272, @krlmlr) dbGetQuery(), dbSendQuery() dbSendStatement() gain params argument, allows used (indirectly) DBI::dbAppendTable() (#210, #215, #261). dbWriteTable() dbBind() methods gain batch_rows argument, control many rows bound batch. default can set globally options(odbc.batch_rows). useful database performs better larger smaller number rows per batch default 1024. (#297) New odbcConnectionColumns() function describe column types. data used binding columns, allows drivers support SQLDescribeParam() ODBC function, freeTDS work better bound columns. (#313, @detule) Added Teradata odbcDataType() support writing logical data Teradata servers (#240, @blarj09). Added Access odbcDataType() method support writing Access databases (#262, @vh-d) odbcListDrivers() gains keep filter argument global options odbc.drivers_keep, odbc.drivers_filter keep filter drivers returned. useful system administrators want reduce number drivers shown users. (@blairj09, #274) Subseconds now retained inserting POSIXct objects (#130, #208) RStudio Connections Pane now shows DSN, available (#304, @davidchall).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-2-0","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.2.0","text":"SQL Server ODBC’s now supports ‘-155’ data type, losing sub-second precision timestamps; still returns type DATETIMEOFFSET character, preserves sub-seconds numeric timezone offset (@r2evans, #207). dbExistsTable() now handles case-sensitivity consistently methods (@shrektan, #285). dbExistsTable() now works SQL Server specifying schemas catalogs using freeTDS Simba drivers. (#197) DBI::dbListFields() longer fails used qualified Id object (using schema table) (#226). dbWriteTable() now always writes NA_character NULL data.frame one row (@shrektan, #288). Fix issue date value fetched database may one day real value (@shrektan, #295).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-116","dir":"Changelog","previous_headings":"","what":"odbc 1.1.6","title":"odbc 1.1.6","text":"CRAN release: 2018-06-09","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-1-6","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.1.6","text":"dbConnect() gains timeout parameter, control long connection attempted timing (#139). Full schema support using Id objects available DBI 0.8 (#91, #120).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-1-6","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.1.6","text":"SQL inputs always converted database encoding querying (#179).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-115","dir":"Changelog","previous_headings":"","what":"odbc 1.1.5","title":"odbc 1.1.5","text":"CRAN release: 2018-01-23 Fix return value dbQuoteIdentifier() given length 0 input (#146 @edgararuiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-114","dir":"Changelog","previous_headings":"","what":"odbc 1.1.4","title":"odbc 1.1.4","text":"CRAN release: 2018-01-10","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-1-4","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.1.4","text":"Add custom sqlCreateTable dbListTables method Teradata connections (#121, @edgararuiz). Add dbms.name parameter dbConnect() allow user set database management system name cases queried Driver (#115, @hoxo-m).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-1-4","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.1.4","text":"Fix multiple transactions rollback (#136). Fix translation missing values integer types (#119). Update PIC flags avoid portability concerns.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-113","dir":"Changelog","previous_headings":"","what":"odbc 1.1.3","title":"odbc 1.1.3","text":"CRAN release: 2017-10-05 Small patch fix install errors CRAN’s MacOS machines.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-112","dir":"Changelog","previous_headings":"","what":"odbc 1.1.2","title":"odbc 1.1.2","text":"CRAN release: 2017-10-02 Add bigint parameter dbConnect() allow user set behavior converting 64 bit integers R types. Fixes compatibility RStudio Connections pane viewer. (@jmcphers). Define BUILD_REAL_64_BIT_MODE compatibility older systems sql.h, ensure always use 8 byte pointers. Added temporary-table support Oracle database using custom sqlCreateTable (#99, @edgararuiz). Fix regression binding due num_columns variable updated odbc_result::bind_list(). Support table creation Vertica Redshift (#93, @khotilov). Changed parameter fieldTypes field.types functions dbWriteTable() sqlCreateTable() compliant DBI (#106, @jschelbert). dbSendStatement longer executes statement, instead done dbBind() dbGetRowsAffected() called. change brings ODBC compliance DBI specification dbSendStatement() (#84, @ruiyiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-111","dir":"Changelog","previous_headings":"","what":"odbc 1.1.1","title":"odbc 1.1.1","text":"CRAN release: 2017-06-27 Workaround drivers implement SQLGetInfo, Access driver (#78). Fix installation error systems without GNU Make default make, Solaris.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-110","dir":"Changelog","previous_headings":"","what":"odbc 1.1.0","title":"odbc 1.1.0","text":"CRAN release: 2017-06-23 Provide fall backs drivers support SQLDescribeParam support transactions. sqlCreateTable() gains fieldTypes argument, allows one override column type given table, default type appropriate. Support databases non UTF-8 encodings. Use encoding parameter dbConnect() specify database encoding. Support SQL Connection Pane RStudio IDE. Unknown fields longer throw warning, instead signal custom condition, can caught desired withCallingHandlers(expr, odbc_unknown_field_type = function(e) {…} ) Conversion timezones handled cctz library. database non-UTC timezone can specified timezone parameter dbConnect(). Time objects converted hms objects. 64 bit integers converted bit64 objects. Support table creation Impala Hive Databases (#38, @edgararuiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-101","dir":"Changelog","previous_headings":"","what":"odbc 1.0.1","title":"odbc 1.0.1","text":"CRAN release: 2017-02-07 force c++14 windows Turn database tests CRAN, think difficult debug even databases supported. Added NEWS.md file track changes package.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-100","dir":"Changelog","previous_headings":"","what":"odbc 1.0.0","title":"odbc 1.0.0","text":"CRAN release: 2017-02-05 Initial odbc release","code":""}] +[{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":[]},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/ISSUE_TEMPLATE.html","id":"reproducible-example","dir":"","previous_headings":"","what":"Reproducible Example","title":"NA","text":"","code":"devtools::session_info() #> output"},{"path":"https://r-dbi.github.io/odbc/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 odbc authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"current-state","dir":"","previous_headings":"","what":"Current state","title":"NA","text":"odbc stable, though still corner cases issues certain database backends. Mostly around text encodings, datetime logical formats.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"known-outstanding-issues","dir":"","previous_headings":"","what":"Known outstanding issues","title":"NA","text":"https://github.com/r-dbi/odbc/blob/main/setup.md contains instructions running tests locally, important make feedback loop shorter. hardest part maintaining odbc often issue occurs specific database, setting environment database usually takes non-trivial amount time.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/MAINTENANCE.html","id":"future-directions","dir":"","previous_headings":"","what":"Future directions","title":"NA","text":"Convert using Rcpp using cpp11. urgent, basically r-lib/tidyverse packages converted. Look updating version nanodbc newer version. complicated fact nanodbc now requires C++14, can’t really drop unless want bump odbc require C++14. Alternatively look recent nanodbc comments port current version odbc. use cases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jim Hester. Author. Hadley Wickham. Author, maintainer. Oliver Gjoneski. Author. lexicalunit. Copyright holder. nanodbc library Google Inc.. Copyright holder. cctz library Posit Software, PBC. Copyright holder, funder.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hester J, Wickham H, Gjoneski O (2023). odbc: Connect ODBC Compatible Databases (using DBI Interface). R package version 1.3.5.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/, https://r-dbi.github.io/odbc/.","code":"@Manual{, title = {odbc: Connect to ODBC Compatible Databases (using the DBI Interface)}, author = {Jim Hester and Hadley Wickham and Oliver Gjoneski}, year = {2023}, note = {R package version 1.3.5.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/}, url = {https://r-dbi.github.io/odbc/}, }"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbc","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"goal odbc package provide DBI-compliant interface Open Database Connectivity (ODBC) drivers. allows efficient, easy setup connection database ODBC drivers available, including SQL Server, Oracle, MySQL, PostgreSQL, SQLite others. implementation builds nanodbc C++ library. Windows MacOS Linux - Debian / Ubuntu R Connection Strings DSN Configuration files Table Field information Reading Writing Querying Reading Writing","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Unix MacOS ODBC drivers compiled unixODBC. Drivers compiled iODBC may also work, fully supported. installation driver manager driver, register driver odbcinst.ini file appear odbc::odbcListDrivers(). odbc dependencies use C++11 features. Therefore need gcc 4.8, clang 3.3 Rtools 3.3 later.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"windows","dir":"","previous_headings":"Installation","what":"Windows","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Windows bundled ODBC libraries. However, drivers database need installed separately. Windows ODBC drivers typically include installer needs run install driver proper locations.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos","dir":"","previous_headings":"Installation","what":"MacOS","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"homebrew can used easily install database drivers MacOS.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"unixodbc---required-for-all-databases","dir":"","previous_headings":"Installation > MacOS","what":"UnixODBC - Required for all databases","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the unixODBC library brew install unixodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"common-db-drivers","dir":"","previous_headings":"Installation > MacOS","what":"Common DB drivers","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Microsoft SQL Server ODBC Drivers (Recommended) brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update brew install msodbcsql17 mssql-tools # SQL Server ODBC Drivers (Free TDS) brew install freetds # PostgreSQL ODBC ODBC Drivers brew install psqlodbc # MySQL ODBC Drivers (and database) brew install mysql # SQLite ODBC Drivers brew install sqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"linux---debian--ubuntu","dir":"","previous_headings":"Installation","what":"Linux - Debian / Ubuntu","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"apt-get can used easily install database drivers Linux distributions support , Debian Ubuntu.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"unixodbc---required-for-all-databases-1","dir":"","previous_headings":"Installation > Linux - Debian / Ubuntu","what":"UnixODBC - Required for all databases","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the unixODBC library apt-get install unixodbc unixodbc-dev"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"common-db-drivers-1","dir":"","previous_headings":"Installation > Linux - Debian / Ubuntu","what":"Common DB drivers","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"SQL Server Linux recommended use Microsoft Drivers.","code":"# SQL Server ODBC Drivers (Free TDS) apt-get install tdsodbc # PostgreSQL ODBC ODBC Drivers apt-get install odbc-postgresql # MySQL ODBC Drivers apt-get install libmyodbc # SQLite ODBC Drivers apt-get install libsqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"r","dir":"","previous_headings":"Installation","what":"R","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"","code":"# Install the latest odbc release from CRAN: install.packages(\"odbc\") # Or the the development version from GitHub: # install.packages(\"pak\") pak::pak(\"r-dbi/odbc\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"connecting-to-a-database","dir":"","previous_headings":"","what":"Connecting to a Database","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Databases can connected specifying connection string directly, DSN configuration files.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"connection-strings","dir":"","previous_headings":"Connecting to a Database","what":"Connection Strings","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Specify connection string named arguments directly dbConnect() method. Alternatively can pass complete connection string .connection_string argument. Connection Strings Reference useful resource example connection strings large variety databases.","code":"library(DBI) con <- dbConnect(odbc::odbc(), driver = \"PostgreSQL Driver\", database = \"test_db\", uid = \"postgres\", pwd = \"password\", host = \"localhost\", port = 5432) library(DBI) con <- dbConnect(odbc::odbc(), .connection_string = \"Driver={PostgreSQL Driver};Uid=postgres;Pwd=password;Host=localhost;Port=5432;Database=test_db;\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"dsn-configuration-files","dir":"","previous_headings":"Connecting to a Database","what":"DSN Configuration files","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC configuration files another option specify connection parameters allow one use Data Source Name (DSN) make easier connect database.","code":"con <- dbConnect(odbc::odbc(), \"PostgreSQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"windows-1","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files","what":"Windows","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC Data Source Administrator application used manage ODBC data sources Windows.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos--linux","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files","what":"MacOS / Linux","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"MacOS Linux two separate text files need edited. UnixODBC includes command line executable odbcinst can used query modify DSN files. However plain text files can also edit hand desired. two different files used setup DSN information. odbcinst.ini - defines driver options odbc.ini - defines connection options DSN configuration files can defined globally users system, often /etc/odbc.ini, /opt/local/etc/odbc.ini /opt/homebrew/etc/odbc.ini, exact location depends option used compiling unixODBC. odbcinst -j can used find exact location. Alternatively ODBCSYSINI environment variable can used specify location configuration files. Ex. ODBCSYSINI=~/ODBC local DSN file can also used files ~/.odbc.ini ~/.odbcinst.ini.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"macos-aarch64","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"MacOS aarch64","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"ODBC trouble locating system data source names, may need override default location ODBC looks configuration files. can use either options specify location DSN configuration files.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"option-1-save-setting-to-renviron","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Create open ~/.Renviron file. Add ODBCSYSINI=/opt/homebrew/etc ~/.Renviron file save changes. Restart open R sessions connecting database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"option-2-set-odbcsysini-environment-variable","dir":"","previous_headings":"","what":"Connect to ODBC Compatible Databases (using the DBI Interface)","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Set ODBCSYSINI environment variable, eg. ODBCSYSINI=/opt/homebrew/etc. Restart open R sessions connecting database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbcinstini","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"odbcinst.ini","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Contains driver information, particularly name driver library. Multiple drivers can specified file. MacOS aarch64 machines, drivers installed via homebrew different location, seen .","code":"[PostgreSQL Driver] Driver = /usr/local/lib/psqlodbcw.so [SQLite Driver] Driver = /usr/local/lib/libsqlite3odbc.dylib [PostgreSQL Driver] Driver = /opt/homebrew/lib/psqlodbcw.so [SQLite Driver] Driver = /opt/homebrew/lib/libsqlite3odbc.dylib"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"odbcini","dir":"","previous_headings":"Connecting to a Database > DSN Configuration files > MacOS / Linux","what":"odbc.ini","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Contains connection information, particularly username, password, database host information. Driver line corresponds driver defined odbcinst.ini. See also: unixODBC without GUI information examples.","code":"[PostgreSQL] Driver = PostgreSQL Driver Database = test_db Servername = localhost UserName = postgres Password = password Port = 5432 [SQLite] Driver = SQLite Driver Database = /tmp/testing"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"following examples assume already created connection con. See Connecting database information establishing connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"table-and-field-information","dir":"","previous_headings":"Usage","what":"Table and Field information","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbListTables() used listing existing tables database.","code":"dbListTables(con) # List tables beginning with f dbListTables(con, table_name = \"f%\") # List all fields in the 'flights' database dbListFields(con, \"flights\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"reading","dir":"","previous_headings":"Usage","what":"Reading","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbReadTable() read full table R data.frame().","code":"data <- dbReadTable(con, \"flights\")"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"writing","dir":"","previous_headings":"Usage","what":"Writing","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbWriteTable() write R data.frame() SQL table.","code":"dbWriteTable(con, \"iris\", iris)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"querying","dir":"","previous_headings":"Usage","what":"Querying","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"dbGetQuery() submit query fetch results. also possible submit query fetch separately dbSendQuery() dbFetch(). n= argument dbFetch() can used fetch part query result (next n rows).","code":"result <- dbSendQuery(con, \"SELECT flight, tailnum, origin FROM flights ORDER BY origin\") # Retrieve the first 100 results first_100 <- dbFetch(result, n = 100) # Retrieve the rest of the results rest <- dbFetch(result)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"benchmarks","dir":"","previous_headings":"","what":"Benchmarks","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"odbc package often much faster existing RODBC DBI compatible RODBCDBI packages.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"reading-1","dir":"","previous_headings":"Benchmarks","what":"Reading","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Reading table SQL Server database ‘flights’ dataset (336,776 rows, 19 columns) package nycflights13.","code":"# First using RODBC / RODBCDBI library(DBI) rodbc <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = Sys.getenv(\"SQLSERVER_UID\"), password = Sys.getenv(\"SQLSERVER_PWD\")) system.time(rodbc_result <- dbReadTable(rodbc, \"flights\")) #> user system elapsed #> 13.986 1.173 15.192 # Now using odbc odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", UID = Sys.getenv(\"SQLSERVER_UID\"), PWD = Sys.getenv(\"SQLSERVER_PWD\")) system.time(odbc_result <- dbReadTable(odbc, \"flights\")) #> user system elapsed #> 1.334 0.065 1.406 tibble::as_tibble(odbc_result) #> # A tibble: 336,776 x 19 #> year month day dep_time sched_dep_time dep_delay arr_time #> #> 1 2013 1 1 517 515 2 830 #> 2 2013 1 1 533 529 4 850 #> 3 2013 1 1 542 540 2 923 #> 4 2013 1 1 544 545 -1 1004 #> 5 2013 1 1 554 600 -6 812 #> 6 2013 1 1 554 558 -4 740 #> 7 2013 1 1 555 600 -5 913 #> 8 2013 1 1 557 600 -3 709 #> 9 2013 1 1 557 600 -3 838 #> 10 2013 1 1 558 600 -2 753 #> # … with 336,766 more rows, and 12 more variables: sched_arr_time , #> # arr_delay , carrier , flight , tailnum , #> # origin , dest , air_time , distance , hour , #> # minute , time_hour identical(dim(rodbc_result), dim(odbc_result)) #> [1] TRUE rm(rodbc_result, odbc_result, odbc, rodbc) gc(verbose = FALSE)"},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"writing-1","dir":"","previous_headings":"Benchmarks","what":"Writing","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"Writing dataset database.","code":"library(nycflights13) # rodbc does not support writing timestamps natively, so we remove that column flights2 <- as.data.frame(flights[, names(flights) != \"time_hour\"]) rodbc <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = Sys.getenv(\"SQLSERVER_UID\"), password = Sys.getenv(\"SQLSERVER_PWD\")) system.time(dbWriteTable(rodbc, \"flights2\", flights2)) #> user system elapsed #> 11.891 6.269 765.269 # Now using odbc odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", UID = Sys.getenv(\"SQLSERVER_UID\"), PWD = Sys.getenv(\"SQLSERVER_PWD\")) flights3 <- as.data.frame(flights) system.time(dbWriteTable(odbc, \"flights3\", flights3)) #> user system elapsed #> 2.617 0.275 9.649"},{"path":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":null,"dir":"Reference","previous_headings":"","what":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"(pre) connection attributes supported can passed part dbConnect call named list attributes parameter:","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"azure_token: string scalar; particular Azure Active Directory authentication token. use Microsoft SQL Server limited support away OEM Microsoft driver.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Connection Methods — OdbcConnection","title":"Odbc Connection Methods — OdbcConnection","text":"Implementations pure virtual functions defined DBI package OdbcConnection objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Connection Methods — OdbcConnection","text":"","code":"# S4 method for OdbcConnection show(object) # S4 method for OdbcConnection dbIsValid(dbObj, ...) # S4 method for OdbcConnection dbDisconnect(conn, ...) # S4 method for OdbcConnection,character dbSendQuery(conn, statement, params = NULL, ..., immediate = FALSE) # S4 method for OdbcConnection,character dbSendStatement(conn, statement, params = NULL, ..., immediate = FALSE) # S4 method for OdbcConnection,ANY dbDataType(dbObj, obj, ...) # S4 method for OdbcConnection,data.frame dbDataType(dbObj, obj, ...) # S4 method for OdbcConnection,character dbQuoteIdentifier(conn, x, ...) # S4 method for OdbcConnection,SQL dbQuoteIdentifier(conn, x, ...) # S4 method for OdbcConnection,character dbRemoveTable(conn, name, ...) # S4 method for OdbcConnection dbGetInfo(dbObj, ...) # S4 method for OdbcConnection,character dbGetQuery(conn, statement, n = -1, params = NULL, ...) # S4 method for OdbcConnection dbBegin(conn, ...) # S4 method for OdbcConnection dbCommit(conn, ...) # S4 method for OdbcConnection dbRollback(conn, ...) # S4 method for OdbcConnection,Id dbExistsTable(conn, name, ...) # S4 method for OdbcConnection,SQL dbExistsTable(conn, name, ...) # S4 method for OdbcConnection,character dbExistsTable(conn, name, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcConnection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Connection Methods — OdbcConnection","text":"object R object dbObj object inheriting DBIObject, .e. DBIDriver, DBIConnection, DBIResult ... arguments methods. conn DBIConnection object, returned dbConnect(). statement character string containing SQL. params Query parameters pass dbBind(), See dbBind() details. immediate TRUE, SQLExecDirect used instead SQLPrepare, params argument ignored obj R object whose SQL type want determine. x character vector, SQL Id object quote identifier. name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Driver Methods — OdbcDriver","title":"Odbc Driver Methods — OdbcDriver","text":"Implementations pure virtual functions defined DBI package OdbcDriver objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Driver Methods — OdbcDriver","text":"","code":"# S4 method for OdbcDriver show(object) # S4 method for OdbcDriver,ANY dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver,list dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver,data.frame dbDataType(dbObj, obj, ...) # S4 method for OdbcDriver dbIsValid(dbObj, ...) # S4 method for OdbcDriver dbGetInfo(dbObj, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcDriver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Driver Methods — OdbcDriver","text":"object R object dbObj object inheriting DBIDriver DBIConnection obj R object whose SQL type want determine. ... arguments passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Result Methods — OdbcResult","title":"Odbc Result Methods — OdbcResult","text":"Implementations pure virtual functions defined DBI package OdbcResult objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc Result Methods — OdbcResult","text":"","code":"# S4 method for OdbcResult dbClearResult(res, ...) # S4 method for OdbcResult dbFetch(res, n = -1, ...) # S4 method for OdbcResult dbHasCompleted(res, ...) # S4 method for OdbcResult dbIsValid(dbObj, ...) # S4 method for OdbcResult dbGetStatement(res, ...) # S4 method for OdbcResult dbColumnInfo(res, ...) # S4 method for OdbcResult dbGetRowCount(res, ...) # S4 method for OdbcResult dbGetRowsAffected(res, ...) # S4 method for OdbcResult dbBind(res, params, ..., batch_rows = getOption(\"odbc.batch_rows\", NA))"},{"path":"https://r-dbi.github.io/odbc/dev/reference/OdbcResult.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Odbc Result Methods — OdbcResult","text":"res object inheriting DBIResult. ... arguments passed methods. n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values. dbObj object inheriting DBIObject, .e. DBIDriver, DBIConnection, DBIResult params list bindings, named unnamed. batch_rows number rows retrieve. Defaults NA, set dynamically size input. Depending database, driver, dataset free memory setting lower value may improve performance.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"SQL Server, conn@quote return quotation mark, however quotation marks well square bracket used interchangeably delimited identifiers. See: https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers?view=sql-server-ver16 Therefore strip brackets first, call DBI method strips quotation marks. TODO: generic implementation DBI take quote char parameter. Local temp tables stored [tempdb].[dbo].[#name]________(padding using underscores)[numeric identifier] can identify name local temp table adjust identifier query appropriately. warn user temporary set TRUE table name conform local temp table naming conventions. writing global temp table, user set temporary flag TRUE.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"conn DBIConnection object, returned dbConnect(). x SQL Id object. ... arguments passed methods. name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') con database connection. table table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') fields Either character vector data frame. named character vector: Names column names, values types. Names escaped dbQuoteIdentifier(). Field types unescaped. data frame: field types generated using dbDataType(). row.names Either TRUE, FALSE, NA string. TRUE, always translate row names column called \"row_names\". FALSE, never translate row names. NA, translate rownames character vector. string equivalent TRUE, allows override default name. backward compatibility, NULL equivalent FALSE. temporary TRUE, generate temporary table statement.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"dbExistsTable() returns logical scalar, TRUE table view specified name argument exists, FALSE otherwise. includes temporary tables supported database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"True : catalog_name supplied must equal \"temdb\" \"%\" ( wildcard ) Name must start \"#\" followd non-\"#\" character Note, implementation assumes metadata attribute set catalog functions accept wildcard entries. Driver note. OEM driver return correctly name, catalog_name = \"tempdb\" circumstances. exmaple name underscores beginwith. FreeTDS, index table correctly unless name adjusted ( allowed trailing wildcards accomodate trailing underscores postfix ). Therefore, cases query name___%. cases simple CREATE TABLE statement used / table identifier differentiator ( viz--viz creating non-temp table ).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"error raised calling method closed invalid connection. error also raised name processed dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbExistsTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call dbQuoteIdentifier(): quoting done tables listed dbListTables(), dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simple class prototype to avoid messages about unknown classes from setMethod — Microsoft SQL Server-class","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbExistsTable(con, \"iris\") #> [1] FALSE dbWriteTable(con, \"iris\", iris) dbExistsTable(con, \"iris\") #> [1] TRUE dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper for Connecting to Databricks via ODBC — databricks","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"Connect Databricks clusters SQL warehouses via Databricks ODBC driver. particular, custom dbConnect() method Databricks ODBC driver implements subset Databricks client unified authentication model, support personal access tokens, OAuth machine--machine credentials, OAuth user--machine credentials supplied via Posit Workbench Databricks CLI desktop. credentials detected automatically present using standard environment variables.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"","code":"databricks() # S4 method for DatabricksOdbcDriver dbConnect( drv, httpPath, workspace = Sys.getenv(\"DATABRICKS_HOST\"), useNativeQuery = TRUE, driver = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"drv object inherits DBIDriver, existing DBIConnection object (order clone existing connection). httpPath query cluster, use HTTP Path value found Advanced Options > JDBC/ODBC Databricks UI. SQL warehouses, found Connection Details instead. workspace URL Databricks workspace, e.g. \"https://example.cloud.databricks.com\". useNativeQuery Suppress driver's conversion ANSI SQL 92 HiveSQL? default (TRUE), gives greater performance means paramterised queries (hence dbWriteTable()) work. driver name Databricks ODBC driver, NULL use default name. ... arguments passed dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"OdbcConnection object active connection Databricks cluster SQL warehouse.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/databricks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper for Connecting to Databricks via ODBC — databricks","text":"","code":"if (FALSE) { DBI::dbConnect( odbc::databricks(), httpPath = \"sql/protocolv1/o/4425955464597947/1026-023828-vn51jugj\" ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"method invoked DBI::dbConnect() called first argument odbc().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"","code":"# S4 method for OdbcDriver dbConnect( drv, dsn = NULL, ..., timezone = \"UTC\", timezone_out = \"UTC\", encoding = \"\", bigint = c(\"integer64\", \"integer\", \"numeric\", \"character\"), timeout = 10, driver = NULL, server = NULL, database = NULL, uid = NULL, pwd = NULL, dbms.name = NULL, attributes = NULL, .connection_string = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"drv OdbcDriver, odbc(). dsn data source name. currently available options, see name column odbcListDataSources() output. ... Additional ODBC keywords. joined arguments form final connection string. Note generic ODBC parameter names, values drv dsn, case-insensitive. case-sensitivity values generic arguments, well names values driver-specific arguments, determined driver drv. timezone server time zone. Useful database internal timezone 'UTC'. database local timezone, set argument Sys.timezone(). See OlsonNames() complete list available time zones system. timezone_out time zone returned R. want display datetime values local timezone, set Sys.timezone(). encoding text encoding used Database. database using UTF-8 need set encoding get accurate re-encoding. See iconvlist() complete list available encodings system. Note strings always returned UTF-8 encoded. bigint R type SQL_BIGINT types mapped . Default bit64::integer64, allows full range 64 bit integers. timeout Time seconds timeout connection attempt. Setting timeout Inf indicates timeout. Defaults 10 seconds. driver ODBC driver name path driver. currently available options, see name column odbcListDrivers() output. server server hostname. drivers use Servername name argument. required configured supplied dsn. database database server. required configured supplied dsn. uid user identifier. drivers use username name argument. required configured supplied dsn. pwd password. drivers use password name argument. required configured supplied dsn. dbms.name database management system name. normally queried automatically ODBC driver. name used class name OdbcConnection object returned dbConnect(). However, driver return valid value, can set manually parameter. attributes S4 object connection attributes passed prior connection established. See ConnectionAttributes. .connection_string complete connection string, useful copy pasting another source. argument used, additional arguments appended string.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"connection string keywords driver dependent. parameters documented common, drivers may accept . Please see specific driver documentation allowed parameters; https://www.connectionstrings.com also useful resource example connection strings variety databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"learn-more","dir":"Reference","previous_headings":"","what":"Learn more","title":"Connect to a database via an ODBC driver — dbConnect,OdbcDriver-method","text":"learn databases: \"Best Practices Working Databases\" documents use odbc package various popular databases. pyodbc \"Drivers Driver Managers\" Wiki provides context drivers driver managers. Microsoft's \"Introduction ODBC\" thorough resource ODBC interface.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List field names of a remote table — dbListFields,OdbcConnection,character-method","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"Returns field names remote table character vector.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"methods-in-other-packages","dir":"Reference","previous_headings":"","what":"Methods in other packages","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"documentation page describes generics. Refer documentation pages linked documentation methods implemented various backend packages. odbc::dbListFields(\"OdbcConnection\", \"character\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"","code":"# S4 method for OdbcConnection,character dbListFields( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"conn DBIConnection object, returned dbConnect(). name table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') catalog_name name catalog return, default returns catalogs. schema_name name schema return, default returns schemas. column_name name column return, default returns columns. ... parameters passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"dbListFields() returns character vector enumerates fields table correct order. also works temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"% can used wildcard search parameters match 0 characters. _ can used match single character.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"table exist, error raised. Invalid types name argument (e.g., character length equal one, numeric) lead error. error also raised calling method closed invalid connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"name argument can string return value dbQuoteIdentifier() value table column return value dbListObjects() is_prefix FALSE column named row_names treated like column.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListFields-OdbcConnection-character-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List field names of a remote table — dbListFields,OdbcConnection,character-method","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbWriteTable(con, \"mtcars\", mtcars) dbListFields(con, \"mtcars\") #> [1] \"mpg\" \"cyl\" \"disp\" \"hp\" \"drat\" \"wt\" \"qsec\" \"vs\" \"am\" \"gear\" #> [11] \"carb\" dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List remote tables — dbListTables,OdbcConnection-method","title":"List remote tables — dbListTables,OdbcConnection-method","text":"Returns unquoted names remote tables accessible connection. include views temporary objects, database backends (particular RMariaDB RMySQL) support .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"methods-in-other-packages","dir":"Reference","previous_headings":"","what":"Methods in other packages","title":"List remote tables — dbListTables,OdbcConnection-method","text":"documentation page describes generics. Refer documentation pages linked documentation methods implemented various backend packages. odbc::dbListTables(\"OdbcConnection\") RSQLite::dbListTables(\"SQLiteConnection\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List remote tables — dbListTables,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection dbListTables( conn, catalog_name = NULL, schema_name = NULL, table_name = NULL, table_type = NULL, ... )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List remote tables — dbListTables,OdbcConnection-method","text":"conn DBIConnection object, returned dbConnect(). catalog_name name catalog return, default returns catalogs. schema_name name schema return, default returns schemas. table_name name table return, default returns tables. table_type type table return, default returns table types. ... parameters passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List remote tables — dbListTables,OdbcConnection-method","text":"dbListTables() returns character vector enumerates tables views database. Tables added dbWriteTable() part list. soon table removed database, also removed list database tables. applies temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List remote tables — dbListTables,OdbcConnection-method","text":"% can used wildcard search parameters match 0 characters. _ can used match single character.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"List remote tables — dbListTables,OdbcConnection-method","text":"error raised calling method closed invalid connection.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-OdbcConnection-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List remote tables — dbListTables,OdbcConnection-method","text":"","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbListTables(con) #> character(0) dbWriteTable(con, \"mtcars\", mtcars) dbListTables(con) #> [1] \"mtcars\" dbDisconnect(con)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","title":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","text":"~~ Methods function dbListTables package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbListTables-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function dbListTables in Package DBI ~~ — dbListTables-methods","text":"signature(conn = \"Teradata\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbQuoteString-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","title":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","text":"~~ Methods function dbQuoteString package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbQuoteString-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function dbQuoteString in Package DBI ~~ — dbQuoteString-methods","text":"signature(conn = \"DBIConnection\", x = \"\") signature(conn = \"DBIConnection\", x = \"character\") signature(conn = \"DBIConnection\", x = \"SQL\") signature(conn = \"Hive\", x = \"character\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"Currently implemented select back-ends use (SQL Server, example). Generic, case develop broader use case.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"","code":"isTempTable(conn, name, ...) # S4 method for OdbcConnection,Id isTempTable(conn, name, ...) # S4 method for OdbcConnection,SQL isTempTable(conn, name, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/isTempTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper method used to determine if a table identifier is that\nof a temporary table. — isTempTable","text":"conn OdbcConnection name Table name ... additional parameters methods","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-package.html","id":null,"dir":"Reference","previous_headings":"","what":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","title":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","text":"DBI-compatible interface ODBC databases.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"odbc: Connect to ODBC Compatible Databases (using the DBI Interface) — odbc-package","text":"Maintainer: Hadley Wickham hadley@posit.co Authors: Jim Hester Oliver Gjoneski contributors: lexicalunit (nanodbc library) [copyright holder] Google Inc. (cctz library) [copyright holder] Posit Software, PBC [copyright holder, funder]","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Convenience functions for reading/writing DBMS tables — odbc-tables","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"Convenience functions reading/writing DBMS tables","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"","code":"# S4 method for OdbcConnection,character,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection,Id,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection,SQL,data.frame dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, row.names = NA, field.types = NULL, batch_rows = getOption(\"odbc.batch_rows\", NA), ... ) # S4 method for OdbcConnection dbAppendTable(conn, name, value, ..., row.names = NULL) # S4 method for OdbcConnection sqlData(con, value, row.names = NA, ...) # S4 method for OdbcConnection sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"conn OdbcConnection object, produced DBI::dbConnect() name character string specifying table name. Names automatically quoted can use sequence characters, just valid bare table name. value data.frame write database. overwrite Allow overwriting destination table. TRUE append also TRUE. append Allow appending destination table. TRUE overwrite also TRUE. temporary TRUE, generate temporary table statement. row.names Either TRUE, FALSE, NA string. TRUE, always translate row names column called \"row_names\". FALSE, never translate row names. NA, translate rownames character vector. string equivalent TRUE, allows override default name. backward compatibility, NULL equivalent FALSE. field.types Additional field types used override derived types. batch_rows number rows retrieve. Defaults NA, set dynamically size input. Depending database, driver, dataset free memory setting lower value may improve performance. ... arguments used individual methods. con database connection. table table name, passed dbQuoteIdentifier(). Options : character string unquoted DBMS table name, e.g. \"table_name\", call Id() components fully qualified table name, e.g. Id(schema = \"my_schema\", table = \"table_name\") call SQL() quoted fully qualified table name given verbatim, e.g. SQL('\"my_schema\".\"table_name\"') fields Either character vector data frame. named character vector: Names column names, values types. Names escaped dbQuoteIdentifier(). Field types unescaped. data frame: field types generated using dbDataType().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc-tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convenience functions for reading/writing DBMS tables — odbc-tables","text":"","code":"if (FALSE) { library(DBI) con <- dbConnect(odbc::odbc()) dbListTables(con) dbWriteTable(con, \"mtcars\", mtcars, temporary = TRUE) dbReadTable(con, \"mtcars\") dbListTables(con) dbExistsTable(con, \"mtcars\") # A zero row data frame just creates a table definition. dbWriteTable(con, \"mtcars2\", mtcars[0, ], temporary = TRUE) dbReadTable(con, \"mtcars2\") dbDisconnect(con) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc driver — odbc","title":"Odbc driver — odbc","text":"Driver ODBC database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Odbc driver — odbc","text":"","code":"odbc()"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Odbc driver — odbc","text":"","code":"if (FALSE) { #' library(DBI) odbc::odbc() }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":null,"dir":"Reference","previous_headings":"","what":"List the actions supported for the connection — odbcConnectionActions","title":"List the actions supported for the connection — odbcConnectionActions","text":"Return list actions can performed connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the actions supported for the connection — odbcConnectionActions","text":"","code":"odbcConnectionActions(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the actions supported for the connection — odbcConnectionActions","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the actions supported for the connection — odbcConnectionActions","text":"named list actions can performed connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionActions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List the actions supported for the connection — odbcConnectionActions","text":"list returned named list actions, action following properties: callback function invoked perform action icon optional path icon representing action","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionCatalogs — odbcConnectionCatalogs","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"function returns listing available catalogs.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"","code":"odbcConnectionCatalogs(conn) # S4 method for OdbcConnection odbcConnectionCatalogs(conn)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionCatalogs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionCatalogs — odbcConnectionCatalogs","text":"conn OdbcConnection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionColumns — odbcConnectionColumns","title":"odbcConnectionColumns — odbcConnectionColumns","text":"given table function returns detailed information fields / columns. expectation relatively thin wrapper around ODBC SQLColumns function call, field names renamed / re-ordered according return specifications .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionColumns — odbcConnectionColumns","text":"","code":"odbcConnectionColumns(conn, name, ...) # S4 method for OdbcConnection,Id odbcConnectionColumns(conn, name, column_name = NULL) # S4 method for OdbcConnection,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL ) # S4 method for OdbcConnection,SQL odbcConnectionColumns(conn, name, ...) # S4 method for Oracle,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionColumns — odbcConnectionColumns","text":"conn OdbcConnection name table wish get information ... additional parameters methods column_name name column return, default returns columns. catalog_name character catalog table located schema_name character schema table located","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"odbcConnectionColumns — odbcConnectionColumns","text":"data.frame columns name field.type - equivalent type_name SQLColumns output table_name schema_name catalog_name data_type column_size buffer_length decimal_digits numeric_precision_radix column_default sql_data_type sql_datetime_subtype char_octet_length ordinal_position nullable","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionColumns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionColumns — odbcConnectionColumns","text":"dbWriteTable() make call method get details fields table writing . particular columns data_type, column_size, decimal_digits used. implementation necessary dbWriteTable() work. odbcConnectionColumns routed SQLColumns ODBC method. function, together remaining catalog functions (SQLTables, etc), default ( SQL_ATTR_METADATA_ID == false ) expect either ordinary arguments (OA) case catalog, pattern value arguments (PV) case schema/table name. , quoted identifiers make sense, unquote identifiers prior call. Query, rather use SQLColumns ODBC API ORACLE since using API bind BIGINT one column results. Oracle's OEM driver unable handle.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":null,"dir":"Reference","previous_headings":"","what":"Get an icon representing a connection. — odbcConnectionIcon","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"Return path disk icon representing connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"","code":"odbcConnectionIcon(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"path icon file disk.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionIcon.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get an icon representing a connection. — odbcConnectionIcon","text":"icon returned 32x32 square image file.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionSchemas — odbcConnectionSchemas","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"function returns listing available schemas.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"","code":"odbcConnectionSchemas(conn, catalog_name) # S4 method for OdbcConnection,ANY odbcConnectionSchemas(conn, catalog_name = NULL) # S4 method for OdbcConnection,character odbcConnectionSchemas(conn, catalog_name)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"conn OdbcConnection catalog_name Catalog looking list schemas.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionSchemas.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionSchemas — odbcConnectionSchemas","text":"Currently, generic connection catalog_name argument ignored. Databricks supports multiple catalogs. hand, default implementation odbcConnectionSchemas routes SQLTables likely enumerate schemas currently active catalog . implementation respect catalog_name arrgument.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionTableTypes — odbcConnectionTableTypes","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"function returns listing table types available database.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"","code":"odbcConnectionTableTypes(conn) # S4 method for OdbcConnection odbcConnectionTableTypes(conn)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTableTypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionTableTypes — odbcConnectionTableTypes","text":"conn OdbcConnection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":null,"dir":"Reference","previous_headings":"","what":"odbcConnectionTables — odbcConnectionTables","title":"odbcConnectionTables — odbcConnectionTables","text":"function returns listing tables accessible connected user. expectation relatively thin wrapper around ODBC SQLTables function call, albeit returning subset fields.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"odbcConnectionTables — odbcConnectionTables","text":"","code":"odbcConnectionTables(conn, name, ...) # S4 method for OdbcConnection,Id odbcConnectionTables(conn, name, table_type = NULL) # S4 method for OdbcConnection,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL ) # S4 method for OdbcConnection,ANY odbcConnectionTables( conn, name = NULL, catalog_name = NULL, schema_name = NULL, table_type = NULL ) # S4 method for OdbcConnection,SQL odbcConnectionTables(conn, name, table_type = NULL) # S4 method for Oracle,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"odbcConnectionTables — odbcConnectionTables","text":"conn OdbcConnection name table wish search ... additional parameters methods table_type List tables type, example 'VIEW'. See odbcConnectionTableTypes listing available table types connection. catalog_name character catalog wish query available tables schema_name character schema wish query available tables.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"odbcConnectionTables — odbcConnectionTables","text":"data.frame columns table_catalog table_schema table_name table_remarks","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcConnectionTables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"odbcConnectionTables — odbcConnectionTables","text":"important note , similar ODBC/API call, method also accomodates pattern-value arguments catalog, schema, table name arguments. extending method, aware package:odbc internally uses method satisfy DBI::dbListTables DBI::dbExistsTable methods. ( former also advertises pattern value arguments ) Query, rather use SQLTables ODBC API performance reasons Oracle. Main functional difference implementation SQLTables ( OEM driver ) query OEM implementation also looks synonyms. Given performance reports, sacrifice synonym look-better execution time.","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the corresponding ODBC data type for an R object — odbcDataType","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"used creating new table dbWriteTable(). Databases default methods defined MySQL PostgreSQL SQL Server Oracle SQLite Spark Hive Impala Redshift Vertica BigQuery Teradata Access","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"","code":"odbcDataType(con, obj, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"con driver connection object, returned dbConnect(). obj R object. ... Additional arguments passed methods.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"Corresponding SQL type obj.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"using different database dbWriteTable() fails SQL parsing error default method appropriate, need write new method.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcDataType.html","id":"defining-a-new-dbdatatype-method","dir":"Reference","previous_headings":"","what":"Defining a new dbDataType method","title":"Return the corresponding ODBC data type for an R object — odbcDataType","text":"object type connection database name retrieved dbGetInfo(con)$dbms.name. Use documentation provided database determine appropriate values R data type. example method definition fictional foo database follows.","code":"con <- dbConnect(odbc::odbc(), \"FooConnection\") dbGetInfo(con)$dbms.name #> [1] \"foo\" `odbcDataType.foo <- function(con, obj, ...) { switch_type(obj, factor = \"VARCHAR(255)\", datetime = \"TIMESTAMP\", date = \"DATE\", binary = \"BINARY\", integer = \"INTEGER\", double = \"DOUBLE\", character = \"VARCHAR(255)\", logical = \"BIT\", list = \"VARCHAR(255)\", stop(\"Unsupported type\", call. = FALSE) ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":null,"dir":"Reference","previous_headings":"","what":"List columns in an object. — odbcListColumns","title":"List columns in an object. — odbcListColumns","text":"Lists names types column (field) specified object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List columns in an object. — odbcListColumns","text":"","code":"odbcListColumns(connection, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List columns in an object. — odbcListColumns","text":"connection connection object, returned dbConnect(). ... Parameters specifying object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List columns in an object. — odbcListColumns","text":"data frame name type columns, listing object's fields.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListColumns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List columns in an object. — odbcListColumns","text":"object inspect must specified one arguments (e.g. table = \"employees\"); depending driver underlying data store, additional specification arguments may required.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":null,"dir":"Reference","previous_headings":"","what":"List Configured Data Source Names — odbcListDataSources","title":"List Configured Data Source Names — odbcListDataSources","text":"Collect information available data source names (DSNs). DSN must installed configured driver manager included list. Configuring DSN just sets lookup table (e.g. odbc.ini) allow users pass DSN dbConnect(). DSNs configured driver manager can still connected dbConnect() providing DSN metadata directly.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List Configured Data Source Names — odbcListDataSources","text":"","code":"odbcListDataSources()"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List Configured Data Source Names — odbcListDataSources","text":"data frame two columns: name Name data source. entries column can passed dsn argument dbConnect(). description Data source description.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDataSources.html","id":"configuration","dir":"Reference","previous_headings":"","what":"Configuration","title":"List Configured Data Source Names — odbcListDataSources","text":"function interfaces driver manager collect information available data source names. MacOS Linux, odbc package supports unixODBC driver manager. unixODBC looks odbc.ini configuration file information DSNs. Find location(s) odbc.ini file(s) odbcinst -j. example odbc.ini file: ...data source name MySQL, appear name column function's output. pass DSN dsn argument dbConnect(), pass string, like \"MySQL\". Driver = MySQL Driver references driver name odbcListDrivers() output. Windows bundled ODBC driver manager. DSN configured driver manager, information DSN automatically passed dbConnect() dsn argument set. example, MySQL data source name configured, driver name MySQL Driver appearing odbcListDrivers() output, code: ...can written: case, dbConnect() look information defined MySQL driver manager (example, odbc.ini) automatically pass needed arguments.","code":"[MySQL] Driver = MySQL Driver Database = test Server = 127.0.0.1 User = root password = root Port = 3306 con <- dbConnect( odbc::odbc(), Driver = \"MySQL Driver\", Database = \"test\", Server = \"127.0.0.1\", User = \"root\", password = \"root\", Port = 3306 ) con <- dbConnect(odbc::odbc(), dsn = \"MySQL\")"},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":null,"dir":"Reference","previous_headings":"","what":"List Configured ODBC Drivers — odbcListDrivers","title":"List Configured ODBC Drivers — odbcListDrivers","text":"Collect information configured driver names. driver must installed configured driver manager included list. Configuring driver name just sets lookup table (e.g. odbcinst.ini) allow users pass driver name dbConnect(). Driver names configured driver manager (thus appear function's output) can still used dbConnect() providing path driver directly.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List Configured ODBC Drivers — odbcListDrivers","text":"","code":"odbcListDrivers( keep = getOption(\"odbc.drivers_keep\"), filter = getOption(\"odbc.drivers_filter\") )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List Configured ODBC Drivers — odbcListDrivers","text":"keep, filter character vector driver names keep remove results, respectively. NULL, driver names kept, none removed, respectively. odbc.drivers_keep odbc.drivers_filter options control argument defaults. Driver names first processed keep, filter. Thus, driver name keep filter, appear output.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List Configured ODBC Drivers — odbcListDrivers","text":"data frame three columns. name Name driver. entries column can passed driver argument dbConnect() (long driver accepts argument). attribute Driver attribute name. value Driver attribute value. driver multiple attributes, one row per attribute, driver name. given driver name attributes, function return one row driver name, last two columns NA.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"configuration","dir":"Reference","previous_headings":"","what":"Configuration","title":"List Configured ODBC Drivers — odbcListDrivers","text":"function interfaces driver manager collect information available driver names. MacOS Linux, odbc package supports unixODBC driver manager. unixODBC looks odbcinst.ini configuration file information driver names. Find location(s) odbcinst.ini file(s) odbcinst -j. example odbcinst.ini file: driver name MySQL Driver, appear name column function's output. pass driver name driver argument dbConnect(), pass string, like \"MySQL Driver\". Windows bundled ODBC driver manager. example, function output include 1 row: name column read \"MySQL Driver\", attribute \"Driver\", value give file path driver. Additional key-value pairs driver name add additional rows name entry. driver configured driver manager, information driver automatically passed dbConnect() driver argument set. example, see section odbcListDataSources() help-file. Instead configuring driver information driver manager, also possible provide path driver directly dbConnect().","code":"[MySQL Driver] Driver=/opt/homebrew/Cellar/mysql/8.2.0_1/lib/libmysqlclient.dylib"},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListDrivers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List Configured ODBC Drivers — odbcListDrivers","text":"","code":"if (FALSE) { odbcListDrivers() }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"Lists object types metadata known connection, object types relate .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"","code":"odbcListObjectTypes(connection)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"connection connection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"hierarchy object types supported connection.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjectTypes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return the object hierarchy supported by a connection. — odbcListObjectTypes","text":"returned hierarchy takes form nested list, object type supported connection named list following attributes: contains list object types contained object, \"data\" object contains data icon optional path icon representing type instance, connection top-level object schema contains tables views, function return list like following:","code":"list(schema = list(contains = list( list(name = \"table\", contains = \"data\") list(name = \"view\", contains = \"data\"))))"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":null,"dir":"Reference","previous_headings":"","what":"List objects in a connection. — odbcListObjects","title":"List objects in a connection. — odbcListObjects","text":"Lists objects connection, objects specific attributes.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List objects in a connection. — odbcListObjects","text":"","code":"odbcListObjects(connection, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List objects in a connection. — odbcListObjects","text":"connection connection object, returned dbConnect(). ... Attributes filter .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List objects in a connection. — odbcListObjects","text":"data frame name type columns, listing objects.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcListObjects.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List objects in a connection. — odbcListObjects","text":"used without parameters, function returns objects known connection. parameters passed filter list objects given attributes; instance, passing schema = \"foo\" return objects matching schema foo.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":null,"dir":"Reference","previous_headings":"","what":"Preview the data in an object. — odbcPreviewObject","title":"Preview the data in an object. — odbcPreviewObject","text":"Return data inside object data frame.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Preview the data in an object. — odbcPreviewObject","text":"","code":"odbcPreviewObject(connection, rowLimit, ...)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Preview the data in an object. — odbcPreviewObject","text":"connection connection object, returned dbConnect(). rowLimit maximum number rows display. ... Parameters specifying object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Preview the data in an object. — odbcPreviewObject","text":"data frame containing data object.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewObject.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Preview the data in an object. — odbcPreviewObject","text":"object previewed must specified one arguments (e.g. table = \"employees\"); depending driver underlying data store, additional specification arguments may required.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a preview query. — odbcPreviewQuery","title":"Create a preview query. — odbcPreviewQuery","text":"Optimize rowLimit argument. S3 since back-ends parse LIMIT syntax. Internal, expected users interact method.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a preview query. — odbcPreviewQuery","text":"","code":"odbcPreviewQuery(connection, rowLimit, name) # S3 method for OdbcConnection odbcPreviewQuery(connection, rowLimit, name) # S3 method for `Microsoft SQL Server` odbcPreviewQuery(connection, rowLimit, name) # S3 method for Oracle odbcPreviewQuery(connection, rowLimit, name)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcPreviewQuery.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a preview query. — odbcPreviewQuery","text":"connection connection object, returned dbConnect(). rowLimit maximum number rows display. name Name object previewed","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"Set Transaction Isolation Level Connection","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"","code":"odbcSetTransactionIsolationLevel(conn, levels)"},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"conn DBIConnection object, returned dbConnect(). levels One ‘read_uncommitted’, ‘read_committed’, ‘repeatable_read’, ‘serializable’ .","code":""},{"path":[]},{"path":"https://r-dbi.github.io/odbc/dev/reference/odbcSetTransactionIsolationLevel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the Transaction Isolation Level for a Connection — odbcSetTransactionIsolationLevel","text":"","code":"if (FALSE) { # Can use spaces or underscores in between words. odbcSetTransactionIsolationLevel(con, \"read uncommitted\") # Can also use the full constant name. odbcSetTransactionIsolationLevel(con, \"SQL_TXN_READ_UNCOMMITTED\") }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/sqlCreateTable-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","title":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","text":"~~ Methods function sqlCreateTable package DBI ~~","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/sqlCreateTable-methods.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"~~ Methods for Function sqlCreateTable in Package DBI ~~ — sqlCreateTable-methods","text":"signature(con = \"DB2/AIX64\") signature(con = \"DBIConnection\") signature(con = \"HDB\") signature(con = \"Oracle\") signature(con = \"Teradata\")","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"test-setup","dir":"","previous_headings":"","what":"Test Setup","title":"Oracle","text":"file contains settings needed setup local testing odbc. useful someone trying develop R package, can run unit tests locally.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"postgresql-and-mysql","dir":"","previous_headings":"","what":"PostgreSQL and MySQL","title":"Oracle","text":"Run locally brew services start mysql brew services start postgres Create ‘test’ database ‘postgres’ user ‘password’ password. See configuration files .github/odbc examples.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"sql-server-test-setup","dir":"","previous_headings":"","what":"SQL Server test setup","title":"Oracle","text":"Install microsoft drivers","code":"brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update brew install msodbcsql17 mssql-tools"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"ini-files","dir":"","previous_headings":"SQL Server test setup","what":"ini files","title":"Oracle","text":"First need install drivers setup ini files odbc.ini need start instance SQL Server docker container. configuration server add testuser create test database","code":"[MicrosoftSQLServer] driver = ODBC Driver 17 for SQL Server Server = 127.0.0.1 port = 1433 docker run -e \"ACCEPT_EULA=Y\" -e \"SA_PASSWORD=Password12\" \\ -p 1433:1433 --name sql1 \\ -d mcr.microsoft.com/mssql/server:2017-latest library(DBI); con <- dbConnect(odbc::odbc(), \"SQLServer\", UID = 'SA', PWD = 'Password12') # Add a test user, but currently unused dbExecute(con, \"USE test\") dbExecute(con, \"EXEC sp_configure 'contained database authentication', 1\") dbExecute(con, \"RECONFIGURE\") dbExecute(con, \"alter database test set containment = partial\") dbExecute(con, \"CREATE USER testuser with password = 'Password12'\") dbExecute(con, \"GRANT CONTROL TO testuser\") dbExecute(con, \"DROP USER testuser\") # Create a test database dbExecute(con, \"CREATE DATABASE test\")"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"rodbc","dir":"","previous_headings":"SQL Server test setup","what":"RODBC","title":"Oracle","text":"need install RODBC benchmarking README. CRAN version RODBC uses iODBC, use unixODBC need recompile source, specifying odbc manager explicitly.","code":"install.packages(\"RODBC\", type = \"source\", INSTALL_opts=\"--configure-args='--with-odbc-manager=odbc'\")"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"linux","dir":"","previous_headings":"","what":"Linux","title":"Oracle","text":"Create docker container docker","code":"docker run -v \"$(pwd)\":\"/opt/$(basename $(pwd))\":delegated --security-opt=seccomp:unconfined --link sql1 -it rstudio/r-base:3.6.1-bionic /bin/bash curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - #Ubuntu 18.04 curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list apt-get update ACCEPT_EULA=Y apt-get install -y msodbcsql17 apt-get install -y unixodbc-dev [MicrosoftSQLServer] driver = ODBC Driver 17 for SQL Server Server = sql1 port = 1433 Database = test"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":null,"dir":"","previous_headings":"","what":"Oracle","title":"Oracle","text":"huge pain.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"get-the-db-container","dir":"","previous_headings":"","what":"Get the DB container","title":"Oracle","text":"","code":"docker login docker pull store/oracle/database-enterprise:12.2.0.1"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"start-the-container","dir":"","previous_headings":"","what":"Start the container","title":"Oracle","text":"-P important setup port forwarding docker container","code":"docker run -d -it --name oracle_db -P store/oracle/database-enterprise:12.2.0.1"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"query-the-port-and-edit-the-ports-in-tnsnamesora","dir":"","previous_headings":"","what":"Query the port and edit the ports in tnsnames.ora","title":"Oracle","text":"Contents snsnames.ora Set current working directory ","code":"docker port oracle_db ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=32769)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain))) ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=32769)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))"},{"path":"https://r-dbi.github.io/odbc/dev/setup.html","id":"add-a-new-user-to-the-db","dir":"","previous_headings":"","what":"Add a new user to the DB","title":"Oracle","text":"docker exec -oracle_db bash -c “source /home/oracle/.bashrc; sqlplus SYS/Oradoc_db1 SYSDBA”","code":"alter session set \"_ORACLE_SCRIPT\"=true; create user test identified by 12345; GRANT ALL PRIVILEGES TO TEST; Sys.setenv(\"TNS_ADMIN\" = getwd()) con <- dbConnect(odbc::odbc(), \"OracleODBC-19\")"},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-development-version","dir":"Changelog","previous_headings":"","what":"odbc (development version)","title":"odbc (development version)","text":"Spark SQL: Correctly enumerate schemas away current catalog (@detule, #614) Modify odbcDataType.Snowflake better reflect Snowflake Data Types documentation (@meztez, #599). SQL Server: Specialize syntax sqlCreateTable avoid failures writing (new) local temp tables. (@detule, #601) SQL Server: Improved handling local temp tables dbWrite, dbAppendTable, dbExistTable (@detule, #600) Teradata: Improved handling temp tables (@detule @But2ene, #589, 590) Oracle: Fix regression falling back odbcConnectionColumns describe column data types (@detule, #587) Add new, specialised odbc::databricks() class dbConnect() method make using Databricks’s ODBC driver easier (@atheriel, #615). Increased minimum required R version 3.2.0 3.6.0 (@simonpcouch, #629). Add support searching multiple paths default location Databricks driver (@bschwedler, #621).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-135","dir":"Changelog","previous_headings":"","what":"odbc 1.3.5","title":"odbc 1.3.5","text":"CRAN release: 2023-06-29 Various fixes R CMD check. argument order sqlCreateTable() methods avoiding weird argument mismatch problems (#448). Fixed truncation retrieving unicode data stored VAR/CHAR columns (@detule, #553). Fixed issue related fetching zero rows (@detule, #528). Backend specific improvements: MYSQL: Fixed retrieving results stored procedures (@detule, #435). Oracle: performance enhancements (#577) Spark: Changed data type date-times DATE TIMESTAMP (@schuemie, #555).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-134","dir":"Changelog","previous_headings":"","what":"odbc 1.3.4","title":"odbc 1.3.4","text":"CRAN release: 2023-01-17 Optimized table preview methods. Enhances large table preview within RStudio IDE (@detule, #525). Added attributes parameter dbConnect(...). Can used pass token authenticate Azure AD using Microsoft SQL Server. Documented ?ConnectionAttributes (@detule, #521). Fix length(x) = 3 > 1' coercion 'logical(1) warning connection observer (@meztez, #494).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-133","dir":"Changelog","previous_headings":"","what":"odbc 1.3.3","title":"odbc 1.3.3","text":"CRAN release: 2021-11-30 Hadley Wickham now maintainer.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-132","dir":"Changelog","previous_headings":"","what":"odbc 1.3.2","title":"odbc 1.3.2","text":"CRAN release: 2021-04-03 New odbcDataType.Snowflake() method Snowflake databases. (@edgararuiz, #451)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-131","dir":"Changelog","previous_headings":"","what":"odbc 1.3.1","title":"odbc 1.3.1","text":"CRAN release: 2021-03-16 Fixed warnings anonymous unions (@detule, #440) Fixed invalid descriptor issues retrieving results SQL Server + Microsoft’s ODBC driver, using parametrized queries. (@detule, #414) Fixed null handling SQL Server / Azure result sets retrieved Microsoft’s ODBC driver. (@detule, #408) Hive uses C-style escaping string literals (single quotes backslash-escaped, note single quote-escaped). dbQuoteString now respects called connection class Hive. (@rnorberg, #184) calling sqlCreateTable(con, ..., temporary = TRUE) con connection class DB2/AIX64, CREATE TABLE statement generated properly creates temporary table DB2. statement begins DECLARE GLOBAL TEMPORARY TABLE ends COMMIT PRESERVE ROWS (DB2’s default behavior COMMIT DELETE ROWS, results inserted data deleted soon dbWriteTable completes). (@rnorberg, #426) Fixed RStudio Connections Pane working database one catalog one schema. (@meztez, #444)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-130","dir":"Changelog","previous_headings":"","what":"odbc 1.3.0","title":"odbc 1.3.0","text":"CRAN release: 2020-10-27","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"major-changes-1-3-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"odbc 1.3.0","text":"odbc can now compiled Rtools35 (gcc 4.9.3) Windows (#383) invalid descriptor errors drivers Microsoft SQLServer driver freeTDS driver support order retrieval now avoided. done unbinding nanodbc buffer past long column. Performance unbound columns cases reduced, retrieval work without error (@detule, #381) dbBind() dbFetch() now support multiple result sets (@vkapartzianis, #345)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"minor-improvements-and-fixes-1-3-0","dir":"Changelog","previous_headings":"","what":"Minor improvements and fixes","title":"odbc 1.3.0","text":"New dbAppendTable() method OdbcConnection objects (#335) dbQuoteIdentifier() now uses input names (). dbWriteTable() dbBind() now default batch_rows NA, sets batch size length input. avoids problems drivers don’t support batch sizes larger input size. restore behavior prior release pass batch_rows = 1024 set options(odbc.batch_rows = 1024) (#391). dbWriteTable() now handles data.table::IDate() objects (#388) dbWriteTable(field.types=) now issues warning rather error missing columns (#342) odbcConnectionColumns() now works intended DBI::Id() objects (#389) dbFetch() now verifies n valid input. Dates now always interpreted database’s local time zone, regardless timezone parameter (#398) Oracle connections now support Date POSIXct types via DATE TIMESTAMP data types (#324, #349, #350) Oracle connections now use VARCHAR2 rather VARCHAR, recommended Oracle’s documentation (#189)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-123","dir":"Changelog","previous_headings":"","what":"odbc 1.2.3","title":"odbc 1.2.3","text":"CRAN release: 2020-06-18 dbWriteTable() now executes immediately, fixes issues temporary tables FreeTDS SQL Server driver (@krlmlr). blob roundtrips now work cases (#364, @krlmlr). BH dependency removed (#326)","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-122","dir":"Changelog","previous_headings":"","what":"odbc 1.2.2","title":"odbc 1.2.2","text":"CRAN release: 2020-01-10 configure script now uses iodbc-config macOS, available. Fix errors drivers fully implement SQLGetInfo (#325).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-121","dir":"Changelog","previous_headings":"","what":"odbc 1.2.1","title":"odbc 1.2.1","text":"CRAN release: 2019-12-05 Fix unicode character width issues macOS odbc CRAN binary. (#283) configure script now works systems whose /bin/sh support command substitution, Solaris 10.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-120","dir":"Changelog","previous_headings":"","what":"odbc 1.2.0","title":"odbc 1.2.0","text":"CRAN release: 2019-11-28","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-2-0","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.2.0","text":"sqlCreateTable() dbWriteTable() now throw error mistakenly include field.types names exist input data. (#271) error message trying write tables unsupported types now includes column name (#238). dbConnect() now new param timezone_out useful user wants datetime values marked specific timezone instead UTC (@shrektan, #294). dbGetQuery(), dbSendQuery() dbSendStatement() gain immediate argument execute statement query immediately instead preparing, executing statement. (#272, @krlmlr) dbGetQuery(), dbSendQuery() dbSendStatement() gain params argument, allows used (indirectly) DBI::dbAppendTable() (#210, #215, #261). dbWriteTable() dbBind() methods gain batch_rows argument, control many rows bound batch. default can set globally options(odbc.batch_rows). useful database performs better larger smaller number rows per batch default 1024. (#297) New odbcConnectionColumns() function describe column types. data used binding columns, allows drivers support SQLDescribeParam() ODBC function, freeTDS work better bound columns. (#313, @detule) Added Teradata odbcDataType() support writing logical data Teradata servers (#240, @blarj09). Added Access odbcDataType() method support writing Access databases (#262, @vh-d) odbcListDrivers() gains keep filter argument global options odbc.drivers_keep, odbc.drivers_filter keep filter drivers returned. useful system administrators want reduce number drivers shown users. (@blairj09, #274) Subseconds now retained inserting POSIXct objects (#130, #208) RStudio Connections Pane now shows DSN, available (#304, @davidchall).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-2-0","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.2.0","text":"SQL Server ODBC’s now supports ‘-155’ data type, losing sub-second precision timestamps; still returns type DATETIMEOFFSET character, preserves sub-seconds numeric timezone offset (@r2evans, #207). dbExistsTable() now handles case-sensitivity consistently methods (@shrektan, #285). dbExistsTable() now works SQL Server specifying schemas catalogs using freeTDS Simba drivers. (#197) DBI::dbListFields() longer fails used qualified Id object (using schema table) (#226). dbWriteTable() now always writes NA_character NULL data.frame one row (@shrektan, #288). Fix issue date value fetched database may one day real value (@shrektan, #295).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-116","dir":"Changelog","previous_headings":"","what":"odbc 1.1.6","title":"odbc 1.1.6","text":"CRAN release: 2018-06-09","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-1-6","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.1.6","text":"dbConnect() gains timeout parameter, control long connection attempted timing (#139). Full schema support using Id objects available DBI 0.8 (#91, #120).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-1-6","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.1.6","text":"SQL inputs always converted database encoding querying (#179).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-115","dir":"Changelog","previous_headings":"","what":"odbc 1.1.5","title":"odbc 1.1.5","text":"CRAN release: 2018-01-23 Fix return value dbQuoteIdentifier() given length 0 input (#146 @edgararuiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-114","dir":"Changelog","previous_headings":"","what":"odbc 1.1.4","title":"odbc 1.1.4","text":"CRAN release: 2018-01-10","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"features-1-1-4","dir":"Changelog","previous_headings":"","what":"Features","title":"odbc 1.1.4","text":"Add custom sqlCreateTable dbListTables method Teradata connections (#121, @edgararuiz). Add dbms.name parameter dbConnect() allow user set database management system name cases queried Driver (#115, @hoxo-m).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"bugfixes-1-1-4","dir":"Changelog","previous_headings":"","what":"Bugfixes","title":"odbc 1.1.4","text":"Fix multiple transactions rollback (#136). Fix translation missing values integer types (#119). Update PIC flags avoid portability concerns.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-113","dir":"Changelog","previous_headings":"","what":"odbc 1.1.3","title":"odbc 1.1.3","text":"CRAN release: 2017-10-05 Small patch fix install errors CRAN’s MacOS machines.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-112","dir":"Changelog","previous_headings":"","what":"odbc 1.1.2","title":"odbc 1.1.2","text":"CRAN release: 2017-10-02 Add bigint parameter dbConnect() allow user set behavior converting 64 bit integers R types. Fixes compatibility RStudio Connections pane viewer. (@jmcphers). Define BUILD_REAL_64_BIT_MODE compatibility older systems sql.h, ensure always use 8 byte pointers. Added temporary-table support Oracle database using custom sqlCreateTable (#99, @edgararuiz). Fix regression binding due num_columns variable updated odbc_result::bind_list(). Support table creation Vertica Redshift (#93, @khotilov). Changed parameter fieldTypes field.types functions dbWriteTable() sqlCreateTable() compliant DBI (#106, @jschelbert). dbSendStatement longer executes statement, instead done dbBind() dbGetRowsAffected() called. change brings ODBC compliance DBI specification dbSendStatement() (#84, @ruiyiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-111","dir":"Changelog","previous_headings":"","what":"odbc 1.1.1","title":"odbc 1.1.1","text":"CRAN release: 2017-06-27 Workaround drivers implement SQLGetInfo, Access driver (#78). Fix installation error systems without GNU Make default make, Solaris.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-110","dir":"Changelog","previous_headings":"","what":"odbc 1.1.0","title":"odbc 1.1.0","text":"CRAN release: 2017-06-23 Provide fall backs drivers support SQLDescribeParam support transactions. sqlCreateTable() gains fieldTypes argument, allows one override column type given table, default type appropriate. Support databases non UTF-8 encodings. Use encoding parameter dbConnect() specify database encoding. Support SQL Connection Pane RStudio IDE. Unknown fields longer throw warning, instead signal custom condition, can caught desired withCallingHandlers(expr, odbc_unknown_field_type = function(e) {…} ) Conversion timezones handled cctz library. database non-UTC timezone can specified timezone parameter dbConnect(). Time objects converted hms objects. 64 bit integers converted bit64 objects. Support table creation Impala Hive Databases (#38, @edgararuiz).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-101","dir":"Changelog","previous_headings":"","what":"odbc 1.0.1","title":"odbc 1.0.1","text":"CRAN release: 2017-02-07 force c++14 windows Turn database tests CRAN, think difficult debug even databases supported. Added NEWS.md file track changes package.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-100","dir":"Changelog","previous_headings":"","what":"odbc 1.0.0","title":"odbc 1.0.0","text":"CRAN release: 2017-02-05 Initial odbc release","code":""}]