Skip to content

Commit 9924af6

Browse files
simonpcouchhadley
andauthored
odbc v1.5.0 (#812)
--------- Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
1 parent e45cc17 commit 9924af6

File tree

8 files changed

+54
-38
lines changed

8 files changed

+54
-38
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: odbc
22
Title: Connect to ODBC Compatible Databases (using the DBI Interface)
3-
Version: 1.4.2.9000
3+
Version: 1.5.0
44
Authors@R: c(
55
person("Jim", "Hester", role = "aut"),
66
person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre")),

NEWS.md

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
# odbc (development version)
1+
# odbc 1.5.0
22

3-
* Long running queries can now be interrupted using Ctrl-C. This
4-
feature is enabled by default in interactive sessions. It can be
5-
controlled by the `interruptible` argument to `dbConnect`, or by the
6-
global option `odbc.interruptible`. Should be considered experimental -
7-
if you experience problems please file an issue on the package github
8-
repository (#796).
9-
10-
* Raises "Cancelling previous query" warnings from R rather than from Rcpp when
11-
a connection has a current result to avoid possible incorrect resource
12-
unwinds with `options(warn = 2)` (#797).
3+
## Major changes
134

14-
* New `odbc::snowflake()` makes it easier to connect to Snowflake,
5+
* New function `snowflake()` makes it easier to connect to Snowflake,
156
automatically handling authentication correctly on platforms that provide
167
Snowflake-native OAuth credentials (@atheriel, #662).
8+
9+
* Long running queries can now be interrupted using Ctrl-C. This
10+
feature is enabled by default in interactive sessions. It can be
11+
controlled by the `interruptible` argument to `dbConnect()` or by the
12+
global option `odbc.interruptible`. Should be considered experimental---if
13+
you experience problems please file an issue on the package's GitHub
14+
repository (#796).
1715

18-
* Transitioned to the cli package for formatting most error messages
19-
(@simonpcouch, #781, #784, #785, #788).
20-
21-
* `databricks()` will now automatically configure the needed driver and driver
22-
manager on macOS (#651).
16+
## Minor improvements and bug fixes
2317

24-
* Snowflake: Improved performance on write (#760).
18+
* Improved argument checking and transitioned to the cli package for
19+
formatting most existing error messages (@simonpcouch, #781, #784, #785, #788).
2520

21+
* Raises "Cancelling previous query" warnings from R rather than from Rcpp when
22+
a connection has a current result to avoid possible incorrect resource
23+
unwinds with `options(warn = 2)` (#797).
24+
2625
* Adjusted the default `batch_rows` value for `dbWriteTable()` and `dbBind()`
2726
methods. odbc 1.3.0 changed the default value from 1024 to `NA`, which sets the
2827
batch size to be the length of the input. While this addressed issues for
@@ -31,26 +30,39 @@
3130
drivers. The package will now interpet `NA` as the minimum of 1024 and the
3231
length of the input (@simonpcouch, #774).
3332

34-
* odbc now always converts the encoding of non-ASCII column names of the SQL
35-
results to UTF-8. (@shrektan, #430)
33+
* The encoding of non-ASCII column names of SQL results is now always converted
34+
to UTF-8. (@shrektan, #430)
3635

37-
* Fixed issue that odbc may throw errors with garbage letters when the encoding
38-
of client and db-server are different. (@shrektan, #432)
36+
* Improved error messages when the encoding of client and db-server are
37+
different. (@shrektan, #432)
3938

40-
* dbListFields: Now works with DBI::Id and DBI::SQL identifiers.
39+
* `dbListFields()` now works with `Id()` and `SQL()` identifiers (#771).
4140

4241
* Transitioned `odbcDataType()` to use S4 for consistency. S3 methods defined
43-
locally will need to be rewritten (#701).
44-
45-
* Teradata: Resolved issue when previewing tables using the Connections pane.
42+
locally will need to be rewritten (@simonpcouch, #701).
4643

4744
* The `"OdbcConnection"` method for `dbQuoteIdentifier()` will no longer
4845
pass `x` to `encodeString()` before returning, for consistency with the
4946
default implementation in DBI (@simonpcouch, #765).
5047

51-
* `odbc::databricks()` now picks up on Posit Workbench-managed Databricks
48+
* A bug in the implementation of a new feature introduced in 1.4.2, where the
49+
package would automatically set the `ODBCSYSINI` environmental variable when
50+
using the unixODBC driver manager, was fixed; that environmental variable
51+
will now actually be set on package load (@simonpcouch, #792).
52+
53+
## Driver specific changes
54+
55+
* `databricks()` will now automatically configure the needed driver and driver
56+
manager on macOS (@simonpcouch, #651).
57+
58+
* `databricks()` now picks up on Posit Workbench-managed Databricks
5259
credentials when rendering Quarto and RMarkdown documents in RStudio
5360
(@atheriel, #805).
61+
62+
* Improved performance on write with Snowflake (#760).
63+
64+
* Resolved issue when previewing tables using the RStudio Connections pane with
65+
Teradata (@simonpcouch, #755).
5466

5567
# odbc 1.4.2
5668

@@ -211,7 +223,8 @@
211223
* When calling `sqlCreateTable(con, ..., temporary = TRUE)` and `con` is a
212224
connection of class `DB2/AIX64`, the `CREATE TABLE` statement that is generated
213225
properly creates a temporary table in DB2. The statement begins with
214-
[`DECLARE GLOBAL TEMPORARY TABLE`](https://www.ibm.com/docs/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_declareglobaltemptable.html)
226+
`DECLARE GLOBAL TEMPORARY TABLE` at
227+
`https://www.ibm.com/docs/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_declareglobaltemptable.html`
215228
and ends with `ON COMMIT PRESERVE ROWS` (DB2's default behavior is
216229
`ON COMMIT DELETE ROWS`, which results in the inserted data being
217230
deleted as soon as `dbWriteTable` completes). (@rnorberg, #426)

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ knitr::opts_chunk$set(
2121
[![Codecov test coverage](https://codecov.io/gh/r-dbi/odbc/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-dbi/odbc?branch=main)
2222
<!-- badges: end -->
2323

24-
The goal of the odbc package is to provide a [DBI](https://dbi.r-dbi.org/)-compliant interface to [ODBC](https://learn.microsoft.com/en-us/sql/odbc/microsoft-open-database-connectivity-odbc) drivers. This makes it easy to connect databases such as [SQL Server](https://www.microsoft.com/en-us/sql-server/), [Oracle](https://www.oracle.com/database), [Databricks](https://www.databricks.com/), and [Snowflake](https://www.snowflake.com/en/).
24+
The goal of the odbc package is to provide a [DBI](https://dbi.r-dbi.org/)-compliant interface to [ODBC](https://learn.microsoft.com/en-us/sql/odbc/microsoft-open-database-connectivity-odbc) drivers. This makes it easy to connect databases such as [SQL Server](https://www.microsoft.com/en-us/sql-server/), Oracle, [Databricks](https://www.databricks.com/), and Snowflake.
2525

2626
The odbc package is an alternative to
2727
[RODBC](https://cran.r-project.org/package=RODBC) and [RODBCDBI](https://cran.r-project.org/package=RODBCDBI) packages, and is typically much faster. See `vignette("benchmarks")` to learn more.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ The goal of the odbc package is to provide a
1919
[ODBC](https://learn.microsoft.com/en-us/sql/odbc/microsoft-open-database-connectivity-odbc)
2020
drivers. This makes it easy to connect databases such as [SQL
2121
Server](https://www.microsoft.com/en-us/sql-server/),
22-
[Oracle](https://www.oracle.com/database),
22+
Oracle,
2323
[Databricks](https://www.databricks.com/), and
24-
[Snowflake](https://www.snowflake.com/en/).
24+
Snowflake.
2525

2626
The odbc package is an alternative to
2727
[RODBC](https://cran.r-project.org/package=RODBC) and

cran-comments.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
## R CMD check results
22

3-
0 errors | 0 warnings | 0 notes
3+
Recent MacOS builds have trigger the NOTE "installed size is 10.8Mb." MacOS builds include all debug symbols and CRAN policy doesn't permit building without them.
4+
5+
"Additional issues" checks on M1 Mac surface a number of new warnings related to GCC SQL/ODBC deprecations resulting from `sys-iodbc` headers overwriting `unixodbc` headers in `R-macos/recipes` (see https://github.com/R-macos/recipes/issues/41 and linked issues).
46

57
## revdepcheck results
68

7-
We checked 28 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
9+
We checked 32 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
810

911
* We saw 0 new problems
1012
* We failed to check 0 packages

revdep/cran.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## revdepcheck results
22

3-
We checked 28 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
3+
We checked 32 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
44

55
* We saw 0 new problems
66
* We failed to check 0 packages

tests/testthat/test-utils.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ test_that("parse_database_error() works with messages from the wild", {
8484
})
8585

8686
test_that("set_odbcsysini() works (#791)", {
87+
skip_on_cran()
8788
skip_if(is_windows())
8889

8990
expect_false(identical(Sys.getenv("ODBCSYSINI"), ""))

vignettes/develop.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For the most part, this vignette assumes a MacOS system with aarch64 (e.g. M1 or
2222

2323
## Posit Professional Drivers
2424

25-
Posit employees have access to the [Posit Professional drivers](https://docs.posit.co/pro-drivers/) and the infrastructure used to build and test them in the [rstudio/pro-drivers](https://github.com/rstudio/pro-drivers) repo. The Posit Professional drivers are a set of drivers vendored from Magnitude Simba that support many of the most popular DBMS, including SQL Server, Oracle, Redshift, Databricks, Snowflake, etc. The repository they're developed in contains tooling to spin up a number of databases in docker containers to test against.
25+
Posit employees have access to the [Posit Professional drivers](https://docs.posit.co/pro-drivers/) and the infrastructure used to build and test them in the rstudio/pro-drivers GitHub repository. The Posit Professional drivers are a set of drivers vendored from Magnitude Simba that support many of the most popular DBMS, including SQL Server, Oracle, Redshift, Databricks, Snowflake, etc. The repository they're developed in contains tooling to spin up a number of databases in docker containers to test against.
2626

2727
Note that Athena, Hive, Impala, MongoDB, and Oracle drivers are [not available for macOS aarch64](https://github.com/oracle/python-cx_Oracle/issues/617) (M1, M2, etc) at the time of writing.
2828

@@ -32,7 +32,7 @@ The only documented installation method for these drivers on MacOS is via RStudi
3232

3333
### Databases
3434

35-
Among other things, the [rstudio/pro-drivers](https://github.com/rstudio/pro-drivers) repo defines a `MAKE` tool for setting up and tearing down databases in docker containers. Ensure that you have a docker daemon running (i.e. Docker Desktop open) and, if you're on macOS aarch64, have `Settings > Use Rosetta for x86_64/amd64 emulation on Apple Silicon` enabled. To start a container for a given `dbms`, run `MAKE dist=none DB=dbms up`, and **tear it down** with `MAKE dist=none DB=db down`. To see available `dbms` options, see the names of `.yml` files in the `docker-compose` directory. Find connection details for each database in `docker/shared/odbc.ini`.
35+
Among other things, the rstudio/pro-drivers GitHub repository defines a `MAKE` tool for setting up and tearing down databases in docker containers. Ensure that you have a docker daemon running (i.e. Docker Desktop open) and, if you're on macOS aarch64, have `Settings > Use Rosetta for x86_64/amd64 emulation on Apple Silicon` enabled. To start a container for a given `dbms`, run `MAKE dist=none DB=dbms up`, and **tear it down** with `MAKE dist=none DB=db down`. To see available `dbms` options, see the names of `.yml` files in the `docker-compose` directory. Find connection details for each database in `docker/shared/odbc.ini`.
3636

3737
DBMS-specific notes:
3838

@@ -313,7 +313,7 @@ In the above, the password has been set as `Sys.setenv(snowflakePass = "actualPa
313313

314314
## Amazon Redshift
315315

316-
If you're a Posit employee, you should have access to the [https://github.com/rstudio/warehouse](https://github.com/rstudio/warehouse) repository. Follow the instructions there to get access to the internal Redshift cluster. Access to the cluster is only enabled through Posit's internal Workbench instance, where the professional drivers will already be installed.
316+
If you're a Posit employee, you should have access to the rstudio/warehouse GitHub repository. Follow the instructions there to get access to the internal Redshift cluster. Access to the cluster is only enabled through Posit's internal Workbench instance, where the professional drivers will already be installed.
317317

318318
Note that Redshift is based on a modified version of PostgreSQL.
319319

0 commit comments

Comments
 (0)