diff --git a/dev/CODE_OF_CONDUCT.html b/dev/CODE_OF_CONDUCT.html index 913315a9..ba456157 100644 --- a/dev/CODE_OF_CONDUCT.html +++ b/dev/CODE_OF_CONDUCT.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/ISSUE_TEMPLATE.html b/dev/ISSUE_TEMPLATE.html index eea75862..97edc1c1 100644 --- a/dev/ISSUE_TEMPLATE.html +++ b/dev/ISSUE_TEMPLATE.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/LICENSE-text.html b/dev/LICENSE-text.html index da96e850..ca6461eb 100644 --- a/dev/LICENSE-text.html +++ b/dev/LICENSE-text.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/LICENSE.html b/dev/LICENSE.html index 2941c010..a7b76fb9 100644 --- a/dev/LICENSE.html +++ b/dev/LICENSE.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/MAINTENANCE.html b/dev/MAINTENANCE.html index 32d2e727..a95e902e 100644 --- a/dev/MAINTENANCE.html +++ b/dev/MAINTENANCE.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/articles/benchmarks.html b/dev/articles/benchmarks.html index 1f934f88..0be9a37b 100644 --- a/dev/articles/benchmarks.html +++ b/dev/articles/benchmarks.html @@ -27,7 +27,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/articles/develop.html b/dev/articles/develop.html index 087e4bf9..327a823f 100644 --- a/dev/articles/develop.html +++ b/dev/articles/develop.html @@ -27,7 +27,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/articles/index.html b/dev/articles/index.html index 1f9e9586..fac5b12e 100644 --- a/dev/articles/index.html +++ b/dev/articles/index.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/articles/setup.html b/dev/articles/setup.html index 1dd87636..b45f21b9 100644 --- a/dev/articles/setup.html +++ b/dev/articles/setup.html @@ -27,7 +27,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/authors.html b/dev/authors.html index 2332fc91..45ca02a8 100644 --- a/dev/authors.html +++ b/dev/authors.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 @@ -86,14 +86,14 @@ Citation Hester J, Wickham H, Gjoneski O (2023). odbc: Connect to ODBC Compatible Databases (using the DBI Interface). -R package version 1.3.5.9000, https://github.com/r-dbi/odbc, +R package version 1.4.0.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/, https://r-dbi.github.io/odbc/. @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, + note = {R package version 1.4.0.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/}, url = {https://r-dbi.github.io/odbc/}, } diff --git a/dev/index.html b/dev/index.html index c282c80d..0531f568 100644 --- a/dev/index.html +++ b/dev/index.html @@ -27,7 +27,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/news/index.html b/dev/news/index.html index 653daa0f..ff635af4 100644 --- a/dev/news/index.html +++ b/dev/news/index.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 @@ -54,14 +54,17 @@ odbc (development version) + + +odbc 1.4.0CRAN release: 2023-12-15 -Major changes +Major changes New odbc::databricks() makes it easier to connect to Databricks, automatically handling many common authentication scenarios (@atheriel, #615). dbListTables(), dbListFields() and dbExistsTable() automatically escape underscores in identifier arguments. This leads to substantial performance improvements for some backends (e.g. snowflake) (@detule, @fh-afrachioni, #618). dbGetQuery() and dbSendQuery() now set immediate = TRUE if you are not using a parameterised query. That should yield a small speed boost in many cases (#633). -Minor improvements and bug fixes +Minor improvements and bug fixes Increased the minimum required R version from 3.2.0 to 3.6.0 (@simonpcouch, #629). S4 classes for the most database drivers are now exported, make it possible to use in other packages (#558). ODBC errors are now spread across multiple lines, making them easier to read (@detule, #564). @@ -69,7 +72,7 @@ Minor improvements DBI::dbConnect(odbc::odbc()) now automatically quotes argument values that need it (#616). -Driver specific changes +Driver specific changes Oracle: Fix regression when falling back to odbcConnectionColumns() to describe column data types (@detule, #587) Spark SQL: Correctly enumerate schemas away from the current catalog (@detule, #614) Snowflake: improved translation from R to snowflake types (@meztez, #599). diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 75edbb7d..3005088d 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -5,7 +5,7 @@ articles: benchmarks: benchmarks.html develop: develop.html setup: setup.html -last_built: 2023-12-15T17:47Z +last_built: 2023-12-16T15:53Z urls: reference: https://r-dbi.github.io/odbc/reference article: https://r-dbi.github.io/odbc/articles diff --git a/dev/reference/ConnectionAttributes.html b/dev/reference/ConnectionAttributes.html index 4970ea04..b7ebad68 100644 --- a/dev/reference/ConnectionAttributes.html +++ b/dev/reference/ConnectionAttributes.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/DBI-classes.html b/dev/reference/DBI-classes.html index cbf70705..9a0197e6 100644 --- a/dev/reference/DBI-classes.html +++ b/dev/reference/DBI-classes.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/DBI-methods.html b/dev/reference/DBI-methods.html index c67f980a..537176a4 100644 --- a/dev/reference/DBI-methods.html +++ b/dev/reference/DBI-methods.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/DBI-tables.html b/dev/reference/DBI-tables.html index abe8ab4b..0f5b9e26 100644 --- a/dev/reference/DBI-tables.html +++ b/dev/reference/DBI-tables.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/OdbcConnection.html b/dev/reference/OdbcConnection.html index 020e8360..a5aef12c 100644 --- a/dev/reference/OdbcConnection.html +++ b/dev/reference/OdbcConnection.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/OdbcDriver.html b/dev/reference/OdbcDriver.html index 7b14de92..1a9475b2 100644 --- a/dev/reference/OdbcDriver.html +++ b/dev/reference/OdbcDriver.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/OdbcResult.html b/dev/reference/OdbcResult.html index a746a926..83029137 100644 --- a/dev/reference/OdbcResult.html +++ b/dev/reference/OdbcResult.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/Oracle.html b/dev/reference/Oracle.html index f7780c80..d0db5430 100644 --- a/dev/reference/Oracle.html +++ b/dev/reference/Oracle.html @@ -48,7 +48,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/SQLServer.html b/dev/reference/SQLServer.html index c3072d75..9ec1f727 100644 --- a/dev/reference/SQLServer.html +++ b/dev/reference/SQLServer.html @@ -86,7 +86,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/databricks.html b/dev/reference/databricks.html index 3843ede6..2b2b8e37 100644 --- a/dev/reference/databricks.html +++ b/dev/reference/databricks.html @@ -24,7 +24,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/dbConnect-OdbcDriver-method.html b/dev/reference/dbConnect-OdbcDriver-method.html index 7baaacff..9b0b2ded 100644 --- a/dev/reference/dbConnect-OdbcDriver-method.html +++ b/dev/reference/dbConnect-OdbcDriver-method.html @@ -18,7 +18,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/dbListTables-OdbcConnection-method.html b/dev/reference/dbListTables-OdbcConnection-method.html index 2fa21343..251f0088 100644 --- a/dev/reference/dbListTables-OdbcConnection-method.html +++ b/dev/reference/dbListTables-OdbcConnection-method.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/index.html b/dev/reference/index.html index b4b721f2..ed1173e7 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/isTempTable.html b/dev/reference/isTempTable.html index e20ef9cf..0744636a 100644 --- a/dev/reference/isTempTable.html +++ b/dev/reference/isTempTable.html @@ -16,7 +16,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbc-package.html b/dev/reference/odbc-package.html index c8b0a31d..9e06b398 100644 --- a/dev/reference/odbc-package.html +++ b/dev/reference/odbc-package.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionActions.html b/dev/reference/odbcConnectionActions.html index 1a5552b3..456e41f9 100644 --- a/dev/reference/odbcConnectionActions.html +++ b/dev/reference/odbcConnectionActions.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionCatalogs.html b/dev/reference/odbcConnectionCatalogs.html index c56bacd1..53735e01 100644 --- a/dev/reference/odbcConnectionCatalogs.html +++ b/dev/reference/odbcConnectionCatalogs.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionColumns.html b/dev/reference/odbcConnectionColumns.html index ee0d0d1b..02808eda 100644 --- a/dev/reference/odbcConnectionColumns.html +++ b/dev/reference/odbcConnectionColumns.html @@ -16,7 +16,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionIcon.html b/dev/reference/odbcConnectionIcon.html index a2356ca7..d2d80846 100644 --- a/dev/reference/odbcConnectionIcon.html +++ b/dev/reference/odbcConnectionIcon.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionSchemas.html b/dev/reference/odbcConnectionSchemas.html index 958163c1..8a593b72 100644 --- a/dev/reference/odbcConnectionSchemas.html +++ b/dev/reference/odbcConnectionSchemas.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionTableTypes.html b/dev/reference/odbcConnectionTableTypes.html index 855f8a35..56cc5aef 100644 --- a/dev/reference/odbcConnectionTableTypes.html +++ b/dev/reference/odbcConnectionTableTypes.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcConnectionTables.html b/dev/reference/odbcConnectionTables.html index 0f8682bb..8e4a7fbb 100644 --- a/dev/reference/odbcConnectionTables.html +++ b/dev/reference/odbcConnectionTables.html @@ -18,7 +18,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcDataType.html b/dev/reference/odbcDataType.html index fe0482f1..fe13284b 100644 --- a/dev/reference/odbcDataType.html +++ b/dev/reference/odbcDataType.html @@ -42,7 +42,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcListColumns.html b/dev/reference/odbcListColumns.html index 1dcc4a3a..ef96c7af 100644 --- a/dev/reference/odbcListColumns.html +++ b/dev/reference/odbcListColumns.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcListDataSources.html b/dev/reference/odbcListDataSources.html index c46b843c..96628ed7 100644 --- a/dev/reference/odbcListDataSources.html +++ b/dev/reference/odbcListDataSources.html @@ -20,7 +20,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcListDrivers.html b/dev/reference/odbcListDrivers.html index fda4697a..6aed1b9d 100644 --- a/dev/reference/odbcListDrivers.html +++ b/dev/reference/odbcListDrivers.html @@ -22,7 +22,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcListObjectTypes.html b/dev/reference/odbcListObjectTypes.html index 6cd535fa..69d11e64 100644 --- a/dev/reference/odbcListObjectTypes.html +++ b/dev/reference/odbcListObjectTypes.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcListObjects.html b/dev/reference/odbcListObjects.html index ec319c3b..673bf2d2 100644 --- a/dev/reference/odbcListObjects.html +++ b/dev/reference/odbcListObjects.html @@ -12,7 +12,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcPreviewObject.html b/dev/reference/odbcPreviewObject.html index 58b8551b..df11b425 100644 --- a/dev/reference/odbcPreviewObject.html +++ b/dev/reference/odbcPreviewObject.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcPreviewQuery.html b/dev/reference/odbcPreviewQuery.html index ef4fed6f..ecdb63cf 100644 --- a/dev/reference/odbcPreviewQuery.html +++ b/dev/reference/odbcPreviewQuery.html @@ -14,7 +14,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/reference/odbcSetTransactionIsolationLevel.html b/dev/reference/odbcSetTransactionIsolationLevel.html index d6118a5f..de07725a 100644 --- a/dev/reference/odbcSetTransactionIsolationLevel.html +++ b/dev/reference/odbcSetTransactionIsolationLevel.html @@ -10,7 +10,7 @@ odbc - 1.3.5.9000 + 1.4.0.9000 diff --git a/dev/search.json b/dev/search.json index 69d93bdd..f398bc48 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":"“Developing odbc” vignette vignette(\"develop\") 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/articles/benchmarks.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Benchmarks","text":"RODBC RODBCDBI trip flights’ tibble subclass, ’ll convert data frame passing package. Also, RODBCDBI package support writing timestamps, remove column well. Now, let’s configure three driver connections Microsoft SQL Server database, one package ’ll benchmarking. code requires dsn MicrosoftSQLServer previously configured; see vignettes(\"setup\") learn .","code":"flights$time_hour <- NULL flights <- as.data.frame(flights) odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\") rodbc <- RODBC::odbcConnect(dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\") rodbcdbi <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = \"SA\", password = \"BoopBop123!\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/benchmarks.html","id":"writing","dir":"Articles","previous_headings":"","what":"Writing","title":"Benchmarks","text":"’ll first benchmark writing flights dataset, contains ~300,000 rows 18 columns, database. code odbc RODBCDBI looks quite similar, use DBI front-end: timings RODBC RODBCDBI quite similar, utilize RODBC back-end:","code":"odbc_write <- system.time(dbWriteTable(odbc, \"flights\", flights)) odbc_write #> user system elapsed #> 0.883 0.176 8.108 rodbcdbi_write <- system.time(dbWriteTable(rodbcdbi, \"flights\", flights)) rodbcdbi_write #> user system elapsed #> 8.287 11.107 257.841 rodbc_write <- system.time(sqlSave(rodbc, flights, \"flights\")) rodbc_write #> user system elapsed #> 8.266 11.023 235.825"},{"path":"https://r-dbi.github.io/odbc/dev/articles/benchmarks.html","id":"reading","dir":"Articles","previous_headings":"","what":"Reading","title":"Benchmarks","text":", syntax odbc RODBCDBI identical, timings RODBCDBI RODBC quite similar.","code":"odbc_read <- system.time(result <- dbReadTable(odbc, \"flights\")) rodbcdbi_read <- system.time(result <- dbReadTable(rodbcdbi, \"flights\")) rodbc_read <- system.time(result <- sqlFetch(rodbc, \"flights\")) odbc_read #> user system elapsed #> 0.515 0.024 0.557 rodbcdbi_read #> user system elapsed #> 1.308 0.035 1.356 rodbc_read #> user system elapsed #> 1.291 0.033 1.343"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"postgresql","dir":"Articles","previous_headings":"","what":"PostgreSQL","title":"Developing odbc","text":"MacOS, install PostgreSQL : ’ll also need install configure PostgreSQL driver psqlodbc; see vignette(\"setup\") learn . launch PostgreSQL server locally, run: Next, create database called “test” (whatever name entry Database odbc.ini file): point, able connect PostgreSQL R interface. Connect : \"PostgreSQL\" replaced whatever DSN ’ve configured.","code":"brew install postgresql@14 brew services start postgresql@14 createdb test postgres <- dbConnect(odbc(), \"PostgreSQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"mysql","dir":"Articles","previous_headings":"","what":"MySQL","title":"Developing odbc","text":"First, installing MySQL Homebrew: MariaDB drivers compatible MySQL easily installed MySQL drivers cases. install MariaDB driver: , link MariaDB driver MySQL data source name. , driver name [MariaDB] configuring MariaDB install odbcinst.ini, first lines odbc.ini entry look something like: running brew services start mysql needed, confirming database running brew services info mysql, able : second argument \"MySQL\" refers data source name configured .","code":"brew install mysql@8.2 brew install mariadb-connector-odbc [MySQL] Driver = MariaDB library(odbc) dbConnect(odbc(), \"MySQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"sql-server-test-setup","dir":"Articles","previous_headings":"","what":"SQL Server test setup","title":"Developing odbc","text":"run Microsoft SQL Server aarch64 (e.g. M1 M2) MacOS, need: Docker 4.16 higher MacOS 13 Ventura (higher) needed, install Docker : Docker Desktop app provides GUI monitor deployed Docker containers lives Docker.app > Show Package Contents > Contents > MacOS > Docker Desktop.app. install SQL Server ODBC driver (optional) command line tool, use: odbc.ini entry look something like: driver name odbcinst.ini [ODBC Driver 18 SQL Server]. docker needed driver installed, deploy container : --platform tag correct M1; see Status: Exited (1) Docker Desktop warning incompatible architectures, navigate Settings > General ensure Use Rosetta x86/amd64 emulation Apple Silicon checked. connect via odbc, need pass UID PWD via connection string; configuring arguments via odbc.ini permitted. container deployed , connection arguments : configuration server add testuser create test database configure server add testing user create test database: Linux, create docker container : run: resulting odbc.ini file look something like:","code":"brew install --cask docker brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew install microsoft/mssql-release/msodbcsql18 microsoft/mssql-release/mssql-tools18 [MicrosoftSQLServer] driver = ODBC Driver 18 for SQL Server Server = 127.0.0.1 port = 1433 Encrypt = no sudo docker run \\ --platform linux/amd64 \\ -e \"ACCEPT_EULA=Y\" \\ -e \"MSSQL_SA_PASSWORD=BoopBop123!\" \\ -p 1433:1433 \\ --name sql1 \\ --hostname sql1 \\ -d mcr.microsoft.com/mssql/server:2022-latest con <- dbConnect( odbc::odbc(), dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\" ) # 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 = 'BoopBop123!'\") dbExecute(con, \"GRANT CONTROL TO testuser\") dbExecute(con, \"DROP USER testuser\") # Create a test database dbExecute(con, \"CREATE DATABASE test\") 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/articles/develop.html","id":"sqlite","dir":"Articles","previous_headings":"","what":"SQLite","title":"Developing odbc","text":"MacOS provides SQLite natively. SQLite odbc driver installed (see vignette(\"setup\") needed), run: example assumes configured SQLite DSN called \"SQLite\".","code":"library(odbc) dbConnect(odbc(), \"SQLite\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"oracle","dir":"Articles","previous_headings":"","what":"Oracle","title":"Developing odbc","text":"huge pain. Get DB container: Start container: -P important set port forwarding docker container. , query port edit ports tnsnames.ora: contents snsnames.ora look like: Ensure current working directly set appropriately. , add new user database: Finally, R:","code":"docker login docker pull store/oracle/database-enterprise:12.2.0.1 docker run -d -it --name oracle_db -P store/oracle/database-enterprise:12.2.0.1 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))) docker exec -it oracle_db bash -c \"source /home/oracle/.bashrc; sqlplus SYS/Oradoc_db1 AS SYSDBA\" 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/articles/develop.html","id":"rodbc","dir":"Articles","previous_headings":"","what":"RODBC","title":"Developing odbc","text":"need install RODBC package benchmarking vignette vignette(\"benchmarks\"). 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/articles/setup.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Installing and Configuring Drivers","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().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"windows","dir":"Articles","previous_headings":"Installation","what":"Windows","title":"Installing and Configuring Drivers","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/articles/setup.html","id":"macos","dir":"Articles","previous_headings":"Installation","what":"MacOS","title":"Installing and Configuring Drivers","text":"homebrew can used easily install database drivers MacOS. UnixODBC driver manager required databases: common database drivers can installed homebrew. drivers available database vendor. driver installations automatically configure driver driver manager. See “Connecting Database” section learn configuring drivers data sources.","code":"## Install the unixODBC library brew install unixodbc ## Microsoft SQL Server ODBC drivers 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 drivers brew install psqlodbc ## MySQL ODBC drivers (and database) brew install mysql brew install mariadb-connector-odbc ## SQLite ODBC drivers brew install sqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"linux---debian-ubuntu","dir":"Articles","previous_headings":"Installation","what":"Linux - Debian / Ubuntu","title":"Installing and Configuring Drivers","text":"apt-get can used easily install database drivers Linux distributions support , Debian Ubuntu. UnixODBC driver manager required databases: SQL Server Linux recommended use Microsoft Drivers. code install common drivers:","code":"## Install the unixODBC library apt-get install unixodbc unixodbc-dev ## SQL Server ODBC Drivers (Free TDS) apt-get install tdsodbc ## PostgreSQL ODBC ODBC Driversz 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/articles/setup.html","id":"driver-configuration","dir":"Articles","previous_headings":"","what":"Driver configuration","title":"Installing and Configuring Drivers","text":"Windows, driver config managed operating system, don’t generally need edit configuration files directly. MacOS Linux, however, driver config managed unixODBC, depending driver installed, may may automatically configured. can see drivers configured running odbcListDrivers(). driver want installed, need edit odbcinst.ini. can use odbcinst -j (provided unixODBC) find file lives. basic form file something like : .e., mapping driver names, location driver file. driver name pass odbc::odbc() connect, e,g: installing driver automatically update file, ’ll need update . ’ll need figure driver library installed, using something like brew list {drivername} dpkg-query -L {drivername}.","code":"[PostgreSQL Driver] Driver = /usr/local/lib/psqlodbcw.so [SQLite Driver] Driver = /usr/local/lib/libsqlite3odbc.dylib library(DBI) con1 <- dbConnect(odbc::odbc(), driver = \"PostgreSQL Driver\") con2 <- dbConnect(odbc::odbc(), driver = \"SQLite Driver\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"data-source-configuration","dir":"Articles","previous_headings":"","what":"Data source configuration","title":"Installing and Configuring Drivers","text":"’s also possible configure named data sources, instead typing : can type: Windows, can set data source using ODBC Data Source Administrator application used manage ODBC data sources Windows. Linux Mac, ’ll need edit odbc.ini (finding location odbcinst -j). data source defined separate section (defined [name]]), paramter going line, e.g.: driver entry represents name driver defined odbcinst.ini. can see currently defined data sources running odbcListDataSources().","code":"library(DBI) con <- dbConnect( odbc::odbc(), driver = \"PostgreSQL Driver\", database = \"test_db\", username = \"postgres\", password = Sys.getenv(\"PASSWORD\"), host = \"localhost\", port = 5432 ) con <- dbConnect(odbc::odbc(), dsn = \"test_db\") [test_db] driver = PostgreSQL Driver database = test_db username = postgres password = password host = localhost port = 5432"},{"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 ODBC drivers. makes easy connect databases SQL Server, Oracle, Databricks, Snowflake. odbc package alternative RODBC RODBCDBI packages, typically much faster. See vignette(\"benchmarks\") learn .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"odbc package one piece R interface databases support ODBC: Support given DBMS provided ODBC driver, defines interact DBMS using standardized syntax ODBC SQL. Drivers can downloaded DBMS vendor , ’re Posit customer, using professional drivers. Drivers managed driver manager, responsible configuring driver locations, optionally named data sources describe connect specific database. Windows bundled driver manager, MacOS Linux require installation unixODBC. Drivers often require manual configuration; see vignette(\"setup\") details. R interface, DBI package provides front-end odbc implements back-end communicate driver manager. odbc package built top nanodbc C++ library. interface DBMSs using R odbc: might also use dbplyr package automatically generate SQL dplyr code.","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":"Install latest release odbc CRAN following code: get bug fix use feature development version, can install development version odbc GitHub:","code":"install.packages(\"odbc\") # install.packages(\"pak\") pak::pak(\"r-dbi/odbc\")"},{"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":"use odbc, begin creating database connection, might look something like : (See vignette(\"setup\") examples connecting variety databases.) dbListTables() used listing existing tables database. dbReadTable() read full table R data.frame(). dbWriteTable() write R data.frame() SQL table. dbGetQuery() submit SQL query fetch results: also possible submit query fetch separately dbSendQuery() dbFetch(). allows use n argument dbFetch() iterate results otherwise large fit memory.","code":"library(DBI) con <- dbConnect( odbc::odbc(), driver = \"SQL Server\", server = \"my-server\", database = \"my-database\", uid = \"my-username\", pwd = rstudioapi::askForPassword(\"Database password\") ) dbListTables(con) data <- dbReadTable(con, \"flights\") dbWriteTable(con, \"iris\", iris) df <- dbGetQuery( con, \"SELECT flight, tailnum, origin FROM flights ORDER BY origin\" )"},{"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":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"","code":"if (FALSE) { conn <- dbConnect( odbc::odbc(), dsn = \"my_azure_mssql_db\", Encrypt = \"yes\", attributes = list(\"azure_token\" = .token) ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-classes.html","id":null,"dir":"Reference","previous_headings":"","what":"DBI classes — DBI-classes","title":"DBI classes — DBI-classes","text":"DBI classes","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Unimportant DBI methods — sqlData,OdbcConnection-method","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"Unimportant DBI methods","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection sqlData(con, value, row.names = NA, ...) # S4 method for HDB sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL ) # S4 method for Hive,character dbQuoteString(conn, x, ...) # S4 method for Teradata sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"... parameters passed methods. conn DBIConnection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Convenience functions for reading/writing DBMS tables — DBI-tables","title":"Convenience functions for reading/writing DBMS tables — DBI-tables","text":"Convenience functions reading/writing DBMS tables","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convenience functions for reading/writing DBMS tables — DBI-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 sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convenience functions for reading/writing DBMS tables — DBI-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/DBI-tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convenience functions for reading/writing DBMS tables — DBI-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/OdbcConnection.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Connection Methods — OdbcConnection-class","title":"Odbc Connection Methods — OdbcConnection-class","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-class","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 = is.null(params)) # 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 dbGetInfo(dbObj, ...) # S4 method for OdbcConnection,character dbGetQuery( conn, statement, n = -1, params = NULL, immediate = is.null(params), ... ) # 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, ...) # S4 method for OdbcConnection,character dbRemoveTable(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-class","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. n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values. 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\"')","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/Oracle.html","id":null,"dir":"Reference","previous_headings":"","what":"Oracle — Oracle-class","title":"Oracle — Oracle-class","text":"Details Oracle methods odbc DBI generics.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"odbcconnectiontables-","dir":"Reference","previous_headings":"","what":"odbcConnectionTables()","title":"Oracle — Oracle-class","text":"Query, rather use SQLTables ODBC API performance reasons. Main functional difference implementation SQLTables OEM driver query OEM implementation also looks synonyms. Given performance reports, sacrifice synonym look-better execution time.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"odbcconnectioncolumns-","dir":"Reference","previous_headings":"","what":"odbcConnectionColumns()","title":"Oracle — Oracle-class","text":"Query, rather use SQLColumns ODBC API, since bind BIGINT one column results Oracle's OEM driver handle .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oracle — Oracle-class","text":"","code":"# S4 method for Oracle sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL ) # S4 method for Oracle,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for Oracle,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL, exact = FALSE )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":null,"dir":"Reference","previous_headings":"","what":"SQL Server — Microsoft SQL Server-class","title":"SQL Server — Microsoft SQL Server-class","text":"Details SQL Server methods odbc DBI generics.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"dbunquoteidentifier-","dir":"Reference","previous_headings":"","what":"dbUnquoteIdentifier()","title":"SQL Server — Microsoft SQL Server-class","text":"conn@quote returns quotation mark, quotation marks square brackets can used interchangeably delimited identifiers. (https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers). function strips brackets first calls DBI method strip quotation marks.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"istemptable-","dir":"Reference","previous_headings":"","what":"isTempTable()","title":"SQL Server — Microsoft SQL Server-class","text":"Local temp tables stored [tempdb].[dbo].[#name]_____[numeric identifier], isTempTable() returns TRUE catalog_name \"tempdb\" \"%\", name starts \"#\".","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"dbexiststable-","dir":"Reference","previous_headings":"","what":"dbExistsTable()","title":"SQL Server — Microsoft SQL Server-class","text":"default implementation reports temporary tables non-existent since live different catalog. method provides special case temporary tables, identified isTempTable().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"sqlcreatetable-","dir":"Reference","previous_headings":"","what":"sqlCreateTable()","title":"SQL Server — Microsoft SQL Server-class","text":"Warns temporary = TRUE name conform temp table naming conventions (.e. start #).","code":""},{"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, HTTPPath, ... )"},{"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, 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 — odbc","title":"Connect to a database via an ODBC driver — odbc","text":"dbConnect() method documented invoked DBI::dbConnect() called first argument odbc(). Connecting database via ODBC driver likely first step analyzing data using odbc package; overview package concepts, see Overview section .","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 — odbc","text":"","code":"odbc() # 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 — odbc","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 ODBC parameter names case-insensitive (e.g.) DRV drv equivalent. Since different R possible source confusion, odbc error supply multiple arguments name case ignored. argument values contain []{}(),;?*=!@ \"quoted\" wrapping {}. can opt-behaviour wrapping value (). 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":"connection-strings","dir":"Reference","previous_headings":"","what":"Connection strings","title":"Connect to a database via an ODBC driver — odbc","text":"Internally, dbConnect() creates connection string using supplied arguments. Connection string keywords driver-dependent; arguments documented common, drivers may accept . Alternatively configuring DSNs driver names driver manager, can pass complete connection string directly .connection_string argument. Connection Strings Reference useful resource example connection strings large variety databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"overview","dir":"Reference","previous_headings":"","what":"Overview","title":"Connect to a database via an ODBC driver — odbc","text":"odbc package one piece R interface databases support ODBC: package supports Database Management System (DBMS) ODBC support. Support given DBMS provided ODBC driver, defines interact DBMS using standardized syntax ODBC SQL. Drivers can downloaded DBMS vendor , Posit customer, using professional drivers. manage information driver data sources provide access , computers use driver manager. Windows bundled driver manager, MacOS Linux require installation one; package supports unixODBC driver manager. R interface, DBI package provides front-end odbc implements back-end communicate driver manager. odbc package built top nanodbc C++ library. Interfacing DBMSs using R odbc involves three high-level steps: Configure drivers data sources: functions odbcListDrivers() odbcListDataSources() help interface driver manager. Connect database: dbConnect() function, called first argument odbc(), connects database using specified ODBC driver create connection object. Interface connections: resulting connection object can passed various functions retrieve information database structure (dbListTables()), iteratively develop queries (dbSendQuery(), dbColumnInfo()), query data objects (dbFetch()).","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 — odbc","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/dbListTables-OdbcConnection-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","title":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"dbListTables() provides names remote tables accessible connection; dbListFields() provides names columns within table.","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 and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection dbListTables( conn, catalog_name = NULL, schema_name = NULL, table_name = NULL, table_type = NULL, ... ) # 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/dbListTables-OdbcConnection-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"conn DBIConnection object, returned dbConnect(). catalog_name, schema_name, table_name Catalog, schema, table names. default, catalog_name, schema_name table_name automatically escape underscores ensure match exactly one table. want search multiple tables using wild cards, need use odbcConnectionTables() directly instead. table_type type table return, default returns table types. ... parameters 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\"') column_name name column return, default returns columns.","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 and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"character vector table field names respectively.","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/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, ..., exact = FALSE) # S4 method for OdbcConnection,Id odbcConnectionColumns(conn, name, ..., column_name = NULL, exact = FALSE) # S4 method for OdbcConnection,character odbcConnectionColumns( conn, name, ..., catalog_name = NULL, schema_name = NULL, column_name = NULL, exact = FALSE ) # S4 method for OdbcConnection,SQL odbcConnectionColumns(conn, name, ..., exact = FALSE)"},{"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, catalog_name, schema_name Catalog, schema, table identifiers. default, interpreted ODBC search pattern _ % wild cards. Set exact = TRUE match _ exactly. ... additional parameters methods exact Set TRUE escape _ identifier names matches exactly, rather matching single character. % always matches number characters unlikely appear table name. column_name name column return, default returns columns.","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 remarks 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.","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, exact = FALSE) # S4 method for OdbcConnection,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for OdbcConnection,ANY odbcConnectionTables( conn, name = NULL, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for OdbcConnection,SQL odbcConnectionTables(conn, name, table_type = NULL, exact = FALSE)"},{"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, catalog_name, schema_name Catalog, schema, table identifiers. default, interpreted ODBC search pattern _ % wild cards. Set exact = TRUE match _ exactly. ... additional parameters methods table_type List tables type, example 'VIEW'. See odbcConnectionTableTypes listing available table types connection. exact Set TRUE escape _ identifier names matches exactly, rather matching single character. % always matches number characters unlikely appear table name.","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 )","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":[]},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"major-changes-development-version","dir":"Changelog","previous_headings":"","what":"Major changes","title":"odbc (development version)","text":"New odbc::databricks() makes easier connect Databricks, automatically handling many common authentication scenarios (@atheriel, #615). dbListTables(), dbListFields() dbExistsTable() automatically escape underscores identifier arguments. leads substantial performance improvements backends (e.g. snowflake) (@detule, @fh-afrachioni, #618). dbGetQuery() dbSendQuery() now set immediate = TRUE using parameterised query. yield small speed boost many cases (#633).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"minor-improvements-and-bug-fixes-development-version","dir":"Changelog","previous_headings":"","what":"Minor improvements and bug fixes","title":"odbc (development version)","text":"Increased minimum required R version 3.2.0 3.6.0 (@simonpcouch, #629). S4 classes database drivers now exported, make possible use packages (#558). ODBC errors now spread across multiple lines, making easier read (@detule, #564). DBI::dbConnect(odbc::odbc()) now gives clear error supply multiple arguments name case ignored (#641). DBI::dbConnect(odbc::odbc()) now automatically quotes argument values need (#616).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"driver-specific-changes-development-version","dir":"Changelog","previous_headings":"","what":"Driver specific changes","title":"odbc (development version)","text":"Oracle: Fix regression falling back odbcConnectionColumns() describe column data types (@detule, #587) Spark SQL: Correctly enumerate schemas away current catalog (@detule, #614) Snowflake: improved translation R snowflake types (@meztez, #599). SQL Server Improved handling local temp tables dbWrite(), dbAppendTable(), dbExistTable() (@detule, #600) Specialize syntax sqlCreateTable avoid failures writing (new) local temp tables. (@detule, #601) Teradata: Improved handling temp tables (@detule @But2ene, #589, 590)","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":"“Developing odbc” vignette vignette(\"develop\") 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/articles/benchmarks.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Benchmarks","text":"RODBC RODBCDBI trip flights’ tibble subclass, ’ll convert data frame passing package. Also, RODBCDBI package support writing timestamps, remove column well. Now, let’s configure three driver connections Microsoft SQL Server database, one package ’ll benchmarking. code requires dsn MicrosoftSQLServer previously configured; see vignettes(\"setup\") learn .","code":"flights$time_hour <- NULL flights <- as.data.frame(flights) odbc <- dbConnect(odbc::odbc(), dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\") rodbc <- RODBC::odbcConnect(dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\") rodbcdbi <- dbConnect(RODBCDBI::ODBC(), dsn = \"MicrosoftSQLServer\", user = \"SA\", password = \"BoopBop123!\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/benchmarks.html","id":"writing","dir":"Articles","previous_headings":"","what":"Writing","title":"Benchmarks","text":"’ll first benchmark writing flights dataset, contains ~300,000 rows 18 columns, database. code odbc RODBCDBI looks quite similar, use DBI front-end: timings RODBC RODBCDBI quite similar, utilize RODBC back-end:","code":"odbc_write <- system.time(dbWriteTable(odbc, \"flights\", flights)) odbc_write #> user system elapsed #> 0.883 0.176 8.108 rodbcdbi_write <- system.time(dbWriteTable(rodbcdbi, \"flights\", flights)) rodbcdbi_write #> user system elapsed #> 8.287 11.107 257.841 rodbc_write <- system.time(sqlSave(rodbc, flights, \"flights\")) rodbc_write #> user system elapsed #> 8.266 11.023 235.825"},{"path":"https://r-dbi.github.io/odbc/dev/articles/benchmarks.html","id":"reading","dir":"Articles","previous_headings":"","what":"Reading","title":"Benchmarks","text":", syntax odbc RODBCDBI identical, timings RODBCDBI RODBC quite similar.","code":"odbc_read <- system.time(result <- dbReadTable(odbc, \"flights\")) rodbcdbi_read <- system.time(result <- dbReadTable(rodbcdbi, \"flights\")) rodbc_read <- system.time(result <- sqlFetch(rodbc, \"flights\")) odbc_read #> user system elapsed #> 0.515 0.024 0.557 rodbcdbi_read #> user system elapsed #> 1.308 0.035 1.356 rodbc_read #> user system elapsed #> 1.291 0.033 1.343"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"postgresql","dir":"Articles","previous_headings":"","what":"PostgreSQL","title":"Developing odbc","text":"MacOS, install PostgreSQL : ’ll also need install configure PostgreSQL driver psqlodbc; see vignette(\"setup\") learn . launch PostgreSQL server locally, run: Next, create database called “test” (whatever name entry Database odbc.ini file): point, able connect PostgreSQL R interface. Connect : \"PostgreSQL\" replaced whatever DSN ’ve configured.","code":"brew install postgresql@14 brew services start postgresql@14 createdb test postgres <- dbConnect(odbc(), \"PostgreSQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"mysql","dir":"Articles","previous_headings":"","what":"MySQL","title":"Developing odbc","text":"First, installing MySQL Homebrew: MariaDB drivers compatible MySQL easily installed MySQL drivers cases. install MariaDB driver: , link MariaDB driver MySQL data source name. , driver name [MariaDB] configuring MariaDB install odbcinst.ini, first lines odbc.ini entry look something like: running brew services start mysql needed, confirming database running brew services info mysql, able : second argument \"MySQL\" refers data source name configured .","code":"brew install mysql@8.2 brew install mariadb-connector-odbc [MySQL] Driver = MariaDB library(odbc) dbConnect(odbc(), \"MySQL\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"sql-server-test-setup","dir":"Articles","previous_headings":"","what":"SQL Server test setup","title":"Developing odbc","text":"run Microsoft SQL Server aarch64 (e.g. M1 M2) MacOS, need: Docker 4.16 higher MacOS 13 Ventura (higher) needed, install Docker : Docker Desktop app provides GUI monitor deployed Docker containers lives Docker.app > Show Package Contents > Contents > MacOS > Docker Desktop.app. install SQL Server ODBC driver (optional) command line tool, use: odbc.ini entry look something like: driver name odbcinst.ini [ODBC Driver 18 SQL Server]. docker needed driver installed, deploy container : --platform tag correct M1; see Status: Exited (1) Docker Desktop warning incompatible architectures, navigate Settings > General ensure Use Rosetta x86/amd64 emulation Apple Silicon checked. connect via odbc, need pass UID PWD via connection string; configuring arguments via odbc.ini permitted. container deployed , connection arguments : configuration server add testuser create test database configure server add testing user create test database: Linux, create docker container : run: resulting odbc.ini file look something like:","code":"brew install --cask docker brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew install microsoft/mssql-release/msodbcsql18 microsoft/mssql-release/mssql-tools18 [MicrosoftSQLServer] driver = ODBC Driver 18 for SQL Server Server = 127.0.0.1 port = 1433 Encrypt = no sudo docker run \\ --platform linux/amd64 \\ -e \"ACCEPT_EULA=Y\" \\ -e \"MSSQL_SA_PASSWORD=BoopBop123!\" \\ -p 1433:1433 \\ --name sql1 \\ --hostname sql1 \\ -d mcr.microsoft.com/mssql/server:2022-latest con <- dbConnect( odbc::odbc(), dsn = \"MicrosoftSQLServer\", uid = \"SA\", pwd = \"BoopBop123!\" ) # 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 = 'BoopBop123!'\") dbExecute(con, \"GRANT CONTROL TO testuser\") dbExecute(con, \"DROP USER testuser\") # Create a test database dbExecute(con, \"CREATE DATABASE test\") 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/articles/develop.html","id":"sqlite","dir":"Articles","previous_headings":"","what":"SQLite","title":"Developing odbc","text":"MacOS provides SQLite natively. SQLite odbc driver installed (see vignette(\"setup\") needed), run: example assumes configured SQLite DSN called \"SQLite\".","code":"library(odbc) dbConnect(odbc(), \"SQLite\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/develop.html","id":"oracle","dir":"Articles","previous_headings":"","what":"Oracle","title":"Developing odbc","text":"huge pain. Get DB container: Start container: -P important set port forwarding docker container. , query port edit ports tnsnames.ora: contents snsnames.ora look like: Ensure current working directly set appropriately. , add new user database: Finally, R:","code":"docker login docker pull store/oracle/database-enterprise:12.2.0.1 docker run -d -it --name oracle_db -P store/oracle/database-enterprise:12.2.0.1 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))) docker exec -it oracle_db bash -c \"source /home/oracle/.bashrc; sqlplus SYS/Oradoc_db1 AS SYSDBA\" 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/articles/develop.html","id":"rodbc","dir":"Articles","previous_headings":"","what":"RODBC","title":"Developing odbc","text":"need install RODBC package benchmarking vignette vignette(\"benchmarks\"). 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/articles/setup.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Installing and Configuring Drivers","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().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"windows","dir":"Articles","previous_headings":"Installation","what":"Windows","title":"Installing and Configuring Drivers","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/articles/setup.html","id":"macos","dir":"Articles","previous_headings":"Installation","what":"MacOS","title":"Installing and Configuring Drivers","text":"homebrew can used easily install database drivers MacOS. UnixODBC driver manager required databases: common database drivers can installed homebrew. drivers available database vendor. driver installations automatically configure driver driver manager. See “Connecting Database” section learn configuring drivers data sources.","code":"## Install the unixODBC library brew install unixodbc ## Microsoft SQL Server ODBC drivers 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 drivers brew install psqlodbc ## MySQL ODBC drivers (and database) brew install mysql brew install mariadb-connector-odbc ## SQLite ODBC drivers brew install sqliteodbc"},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"linux---debian-ubuntu","dir":"Articles","previous_headings":"Installation","what":"Linux - Debian / Ubuntu","title":"Installing and Configuring Drivers","text":"apt-get can used easily install database drivers Linux distributions support , Debian Ubuntu. UnixODBC driver manager required databases: SQL Server Linux recommended use Microsoft Drivers. code install common drivers:","code":"## Install the unixODBC library apt-get install unixodbc unixodbc-dev ## SQL Server ODBC Drivers (Free TDS) apt-get install tdsodbc ## PostgreSQL ODBC ODBC Driversz 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/articles/setup.html","id":"driver-configuration","dir":"Articles","previous_headings":"","what":"Driver configuration","title":"Installing and Configuring Drivers","text":"Windows, driver config managed operating system, don’t generally need edit configuration files directly. MacOS Linux, however, driver config managed unixODBC, depending driver installed, may may automatically configured. can see drivers configured running odbcListDrivers(). driver want installed, need edit odbcinst.ini. can use odbcinst -j (provided unixODBC) find file lives. basic form file something like : .e., mapping driver names, location driver file. driver name pass odbc::odbc() connect, e,g: installing driver automatically update file, ’ll need update . ’ll need figure driver library installed, using something like brew list {drivername} dpkg-query -L {drivername}.","code":"[PostgreSQL Driver] Driver = /usr/local/lib/psqlodbcw.so [SQLite Driver] Driver = /usr/local/lib/libsqlite3odbc.dylib library(DBI) con1 <- dbConnect(odbc::odbc(), driver = \"PostgreSQL Driver\") con2 <- dbConnect(odbc::odbc(), driver = \"SQLite Driver\")"},{"path":"https://r-dbi.github.io/odbc/dev/articles/setup.html","id":"data-source-configuration","dir":"Articles","previous_headings":"","what":"Data source configuration","title":"Installing and Configuring Drivers","text":"’s also possible configure named data sources, instead typing : can type: Windows, can set data source using ODBC Data Source Administrator application used manage ODBC data sources Windows. Linux Mac, ’ll need edit odbc.ini (finding location odbcinst -j). data source defined separate section (defined [name]]), paramter going line, e.g.: driver entry represents name driver defined odbcinst.ini. can see currently defined data sources running odbcListDataSources().","code":"library(DBI) con <- dbConnect( odbc::odbc(), driver = \"PostgreSQL Driver\", database = \"test_db\", username = \"postgres\", password = Sys.getenv(\"PASSWORD\"), host = \"localhost\", port = 5432 ) con <- dbConnect(odbc::odbc(), dsn = \"test_db\") [test_db] driver = PostgreSQL Driver database = test_db username = postgres password = password host = localhost port = 5432"},{"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.4.0.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.4.0.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 ODBC drivers. makes easy connect databases SQL Server, Oracle, Databricks, Snowflake. odbc package alternative RODBC RODBCDBI packages, typically much faster. See vignette(\"benchmarks\") learn .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Connect to ODBC Compatible Databases (using the DBI Interface)","text":"odbc package one piece R interface databases support ODBC: Support given DBMS provided ODBC driver, defines interact DBMS using standardized syntax ODBC SQL. Drivers can downloaded DBMS vendor , ’re Posit customer, using professional drivers. Drivers managed driver manager, responsible configuring driver locations, optionally named data sources describe connect specific database. Windows bundled driver manager, MacOS Linux require installation unixODBC. Drivers often require manual configuration; see vignette(\"setup\") details. R interface, DBI package provides front-end odbc implements back-end communicate driver manager. odbc package built top nanodbc C++ library. interface DBMSs using R odbc: might also use dbplyr package automatically generate SQL dplyr code.","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":"Install latest release odbc CRAN following code: get bug fix use feature development version, can install development version odbc GitHub:","code":"install.packages(\"odbc\") # install.packages(\"pak\") pak::pak(\"r-dbi/odbc\")"},{"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":"use odbc, begin creating database connection, might look something like : (See vignette(\"setup\") examples connecting variety databases.) dbListTables() used listing existing tables database. dbReadTable() read full table R data.frame(). dbWriteTable() write R data.frame() SQL table. dbGetQuery() submit SQL query fetch results: also possible submit query fetch separately dbSendQuery() dbFetch(). allows use n argument dbFetch() iterate results otherwise large fit memory.","code":"library(DBI) con <- dbConnect( odbc::odbc(), driver = \"SQL Server\", server = \"my-server\", database = \"my-database\", uid = \"my-username\", pwd = rstudioapi::askForPassword(\"Database password\") ) dbListTables(con) data <- dbReadTable(con, \"flights\") dbWriteTable(con, \"iris\", iris) df <- dbGetQuery( con, \"SELECT flight, tailnum, origin FROM flights ORDER BY origin\" )"},{"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":"https://r-dbi.github.io/odbc/dev/reference/ConnectionAttributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Supported Connection Attributes — SUPPORTED_CONNECTION_ATTRIBUTES","text":"","code":"if (FALSE) { conn <- dbConnect( odbc::odbc(), dsn = \"my_azure_mssql_db\", Encrypt = \"yes\", attributes = list(\"azure_token\" = .token) ) }"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-classes.html","id":null,"dir":"Reference","previous_headings":"","what":"DBI classes — DBI-classes","title":"DBI classes — DBI-classes","text":"DBI classes","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":null,"dir":"Reference","previous_headings":"","what":"Unimportant DBI methods — sqlData,OdbcConnection-method","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"Unimportant DBI methods","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection sqlData(con, value, row.names = NA, ...) # S4 method for HDB sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL ) # S4 method for Hive,character dbQuoteString(conn, x, ...) # S4 method for Teradata sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-methods.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unimportant DBI methods — sqlData,OdbcConnection-method","text":"... parameters passed methods. conn DBIConnection object, returned dbConnect().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Convenience functions for reading/writing DBMS tables — DBI-tables","title":"Convenience functions for reading/writing DBMS tables — DBI-tables","text":"Convenience functions reading/writing DBMS tables","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convenience functions for reading/writing DBMS tables — DBI-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 sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/DBI-tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convenience functions for reading/writing DBMS tables — DBI-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/DBI-tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convenience functions for reading/writing DBMS tables — DBI-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/OdbcConnection.html","id":null,"dir":"Reference","previous_headings":"","what":"Odbc Connection Methods — OdbcConnection-class","title":"Odbc Connection Methods — OdbcConnection-class","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-class","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 = is.null(params)) # 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 dbGetInfo(dbObj, ...) # S4 method for OdbcConnection,character dbGetQuery( conn, statement, n = -1, params = NULL, immediate = is.null(params), ... ) # 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, ...) # S4 method for OdbcConnection,character dbRemoveTable(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-class","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. n maximum number records retrieve per fetch. Use n = -1 n = Inf retrieve pending records. implementations may recognize special values. 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\"')","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/Oracle.html","id":null,"dir":"Reference","previous_headings":"","what":"Oracle — Oracle-class","title":"Oracle — Oracle-class","text":"Details Oracle methods odbc DBI generics.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"odbcconnectiontables-","dir":"Reference","previous_headings":"","what":"odbcConnectionTables()","title":"Oracle — Oracle-class","text":"Query, rather use SQLTables ODBC API performance reasons. Main functional difference implementation SQLTables OEM driver query OEM implementation also looks synonyms. Given performance reports, sacrifice synonym look-better execution time.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"odbcconnectioncolumns-","dir":"Reference","previous_headings":"","what":"odbcConnectionColumns()","title":"Oracle — Oracle-class","text":"Query, rather use SQLColumns ODBC API, since bind BIGINT one column results Oracle's OEM driver handle .","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/Oracle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oracle — Oracle-class","text":"","code":"# S4 method for Oracle sqlCreateTable( con, table, fields, row.names = NA, temporary = FALSE, ..., field.types = NULL ) # S4 method for Oracle,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for Oracle,character odbcConnectionColumns( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL, exact = FALSE )"},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":null,"dir":"Reference","previous_headings":"","what":"SQL Server — Microsoft SQL Server-class","title":"SQL Server — Microsoft SQL Server-class","text":"Details SQL Server methods odbc DBI generics.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"dbunquoteidentifier-","dir":"Reference","previous_headings":"","what":"dbUnquoteIdentifier()","title":"SQL Server — Microsoft SQL Server-class","text":"conn@quote returns quotation mark, quotation marks square brackets can used interchangeably delimited identifiers. (https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers). function strips brackets first calls DBI method strip quotation marks.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"istemptable-","dir":"Reference","previous_headings":"","what":"isTempTable()","title":"SQL Server — Microsoft SQL Server-class","text":"Local temp tables stored [tempdb].[dbo].[#name]_____[numeric identifier], isTempTable() returns TRUE catalog_name \"tempdb\" \"%\", name starts \"#\".","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"dbexiststable-","dir":"Reference","previous_headings":"","what":"dbExistsTable()","title":"SQL Server — Microsoft SQL Server-class","text":"default implementation reports temporary tables non-existent since live different catalog. method provides special case temporary tables, identified isTempTable().","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/SQLServer.html","id":"sqlcreatetable-","dir":"Reference","previous_headings":"","what":"sqlCreateTable()","title":"SQL Server — Microsoft SQL Server-class","text":"Warns temporary = TRUE name conform temp table naming conventions (.e. start #).","code":""},{"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, HTTPPath, ... )"},{"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, 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 — odbc","title":"Connect to a database via an ODBC driver — odbc","text":"dbConnect() method documented invoked DBI::dbConnect() called first argument odbc(). Connecting database via ODBC driver likely first step analyzing data using odbc package; overview package concepts, see Overview section .","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 — odbc","text":"","code":"odbc() # 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 — odbc","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 ODBC parameter names case-insensitive (e.g.) DRV drv equivalent. Since different R possible source confusion, odbc error supply multiple arguments name case ignored. argument values contain []{}(),;?*=!@ \"quoted\" wrapping {}. can opt-behaviour wrapping value (). 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":"connection-strings","dir":"Reference","previous_headings":"","what":"Connection strings","title":"Connect to a database via an ODBC driver — odbc","text":"Internally, dbConnect() creates connection string using supplied arguments. Connection string keywords driver-dependent; arguments documented common, drivers may accept . Alternatively configuring DSNs driver names driver manager, can pass complete connection string directly .connection_string argument. Connection Strings Reference useful resource example connection strings large variety databases.","code":""},{"path":"https://r-dbi.github.io/odbc/dev/reference/dbConnect-OdbcDriver-method.html","id":"overview","dir":"Reference","previous_headings":"","what":"Overview","title":"Connect to a database via an ODBC driver — odbc","text":"odbc package one piece R interface databases support ODBC: package supports Database Management System (DBMS) ODBC support. Support given DBMS provided ODBC driver, defines interact DBMS using standardized syntax ODBC SQL. Drivers can downloaded DBMS vendor , Posit customer, using professional drivers. manage information driver data sources provide access , computers use driver manager. Windows bundled driver manager, MacOS Linux require installation one; package supports unixODBC driver manager. R interface, DBI package provides front-end odbc implements back-end communicate driver manager. odbc package built top nanodbc C++ library. Interfacing DBMSs using R odbc involves three high-level steps: Configure drivers data sources: functions odbcListDrivers() odbcListDataSources() help interface driver manager. Connect database: dbConnect() function, called first argument odbc(), connects database using specified ODBC driver create connection object. Interface connections: resulting connection object can passed various functions retrieve information database structure (dbListTables()), iteratively develop queries (dbSendQuery(), dbColumnInfo()), query data objects (dbFetch()).","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 — odbc","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/dbListTables-OdbcConnection-method.html","id":null,"dir":"Reference","previous_headings":"","what":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","title":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"dbListTables() provides names remote tables accessible connection; dbListFields() provides names columns within table.","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 and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"","code":"# S4 method for OdbcConnection dbListTables( conn, catalog_name = NULL, schema_name = NULL, table_name = NULL, table_type = NULL, ... ) # 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/dbListTables-OdbcConnection-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List remote tables and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"conn DBIConnection object, returned dbConnect(). catalog_name, schema_name, table_name Catalog, schema, table names. default, catalog_name, schema_name table_name automatically escape underscores ensure match exactly one table. want search multiple tables using wild cards, need use odbcConnectionTables() directly instead. table_type type table return, default returns table types. ... parameters 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\"') column_name name column return, default returns columns.","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 and fields for an ODBC connection — dbListTables,OdbcConnection-method","text":"character vector table field names respectively.","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/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, ..., exact = FALSE) # S4 method for OdbcConnection,Id odbcConnectionColumns(conn, name, ..., column_name = NULL, exact = FALSE) # S4 method for OdbcConnection,character odbcConnectionColumns( conn, name, ..., catalog_name = NULL, schema_name = NULL, column_name = NULL, exact = FALSE ) # S4 method for OdbcConnection,SQL odbcConnectionColumns(conn, name, ..., exact = FALSE)"},{"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, catalog_name, schema_name Catalog, schema, table identifiers. default, interpreted ODBC search pattern _ % wild cards. Set exact = TRUE match _ exactly. ... additional parameters methods exact Set TRUE escape _ identifier names matches exactly, rather matching single character. % always matches number characters unlikely appear table name. column_name name column return, default returns columns.","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 remarks 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.","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, exact = FALSE) # S4 method for OdbcConnection,character odbcConnectionTables( conn, name, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for OdbcConnection,ANY odbcConnectionTables( conn, name = NULL, catalog_name = NULL, schema_name = NULL, table_type = NULL, exact = FALSE ) # S4 method for OdbcConnection,SQL odbcConnectionTables(conn, name, table_type = NULL, exact = FALSE)"},{"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, catalog_name, schema_name Catalog, schema, table identifiers. default, interpreted ODBC search pattern _ % wild cards. Set exact = TRUE match _ exactly. ... additional parameters methods table_type List tables type, example 'VIEW'. See odbcConnectionTableTypes listing available table types connection. exact Set TRUE escape _ identifier names matches exactly, rather matching single character. % always matches number characters unlikely appear table name.","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 )","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":[]},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"odbc-140","dir":"Changelog","previous_headings":"","what":"odbc 1.4.0","title":"odbc 1.4.0","text":"CRAN release: 2023-12-15","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"major-changes-1-4-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"odbc 1.4.0","text":"New odbc::databricks() makes easier connect Databricks, automatically handling many common authentication scenarios (@atheriel, #615). dbListTables(), dbListFields() dbExistsTable() automatically escape underscores identifier arguments. leads substantial performance improvements backends (e.g. snowflake) (@detule, @fh-afrachioni, #618). dbGetQuery() dbSendQuery() now set immediate = TRUE using parameterised query. yield small speed boost many cases (#633).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"minor-improvements-and-bug-fixes-1-4-0","dir":"Changelog","previous_headings":"","what":"Minor improvements and bug fixes","title":"odbc 1.4.0","text":"Increased minimum required R version 3.2.0 3.6.0 (@simonpcouch, #629). S4 classes database drivers now exported, make possible use packages (#558). ODBC errors now spread across multiple lines, making easier read (@detule, #564). DBI::dbConnect(odbc::odbc()) now gives clear error supply multiple arguments name case ignored (#641). DBI::dbConnect(odbc::odbc()) now automatically quotes argument values need (#616).","code":""},{"path":"https://r-dbi.github.io/odbc/dev/news/index.html","id":"driver-specific-changes-1-4-0","dir":"Changelog","previous_headings":"","what":"Driver specific changes","title":"odbc 1.4.0","text":"Oracle: Fix regression falling back odbcConnectionColumns() describe column data types (@detule, #587) Spark SQL: Correctly enumerate schemas away current catalog (@detule, #614) Snowflake: improved translation R snowflake types (@meztez, #599). SQL Server Improved handling local temp tables dbWrite(), dbAppendTable(), dbExistTable() (@detule, #600) Specialize syntax sqlCreateTable avoid failures writing (new) local temp tables. (@detule, #601) Teradata: Improved handling temp tables (@detule @But2ene, #589, 590)","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":""}]
Hester J, Wickham H, Gjoneski O (2023). odbc: Connect to ODBC Compatible Databases (using the DBI Interface). -R package version 1.3.5.9000, https://github.com/r-dbi/odbc, +R package version 1.4.0.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/, https://r-dbi.github.io/odbc/.
@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, + note = {R package version 1.4.0.9000, https://github.com/r-dbi/odbc, https://solutions.posit.co/connections/db/}, url = {https://r-dbi.github.io/odbc/}, }
CRAN release: 2023-12-15
New odbc::databricks() makes it easier to connect to Databricks, automatically handling many common authentication scenarios (@atheriel, #615).
odbc::databricks()
dbListTables(), dbListFields() and dbExistsTable() automatically escape underscores in identifier arguments. This leads to substantial performance improvements for some backends (e.g. snowflake) (@detule, @fh-afrachioni, #618).
dbListTables()
dbListFields()
dbExistsTable()
dbGetQuery() and dbSendQuery() now set immediate = TRUE if you are not using a parameterised query. That should yield a small speed boost in many cases (#633).
dbGetQuery()
dbSendQuery()
immediate = TRUE
Increased the minimum required R version from 3.2.0 to 3.6.0 (@simonpcouch, #629).
S4 classes for the most database drivers are now exported, make it possible to use in other packages (#558).
ODBC errors are now spread across multiple lines, making them easier to read (@detule, #564).
DBI::dbConnect(odbc::odbc()) now automatically quotes argument values that need it (#616).
DBI::dbConnect(odbc::odbc())
Oracle: Fix regression when falling back to odbcConnectionColumns() to describe column data types (@detule, #587)
odbcConnectionColumns()
Spark SQL: Correctly enumerate schemas away from the current catalog (@detule, #614)
Snowflake: improved translation from R to snowflake types (@meztez, #599).