Connect to ODBC databases (using the DBI interface)
dbAppendTable()
Improve performance by checking existence once (#691).
dbConnect()
no longer automatically escapes suspicious characters
(since there doesn't seem to be a consistent way to do this across drivers)
but instead points you to quote_value()
which applies a heuristic
that should work for most drivers (#718).
New wrapper for dbExecute()
that sets immediate = TRUE
if you are
not supplying params
. That should yield a small speed boost in
many cases (#706).
dbSendQuery()
once again defaults to immediate = FALSE
(since if you're
using it instead of dbGetQuery()
you're likely to be using it with
dbBind()
). (#726).
Deprecated odbcConnectionColumns()
(in favor of dbListFields()
),
odbcConnectionActions()
, and odbcConnectionIcon()
(@simonpcouch, #699).
Backend specific changes:
databricks: Fix schema enumeration in connections pane (@detule, #715).
Oracle: use more reliable technique to determine user/schema name (#738),
and fix dbExistsTable()
when identifier components contain _
(@detule, #712).
SQL Server: improvements to dbExists()
(@meztez, #724) and
dbListTables()
(@simonpcouch, #509) for temporary tables.
It now uses column type "BIGINT"
integer64 objects.
SQL Server with freetds driver: no longer crashes when executing multiple queries (@detule, #731).
Teradata: Fix usage of exact
argument in internal methods (@detule, 717).
On MacOS and Linux, the package will now automatically set the ODBCSYSINI
environmental variable when using the unixODBC driver manager. ODBCSYSINI
will not be changed if it exists already (@simonpcouch, #709).
New odbcListConfig()
lists configuration files on Mac and Linux
(@simonpcouch, #565).
databricks()
now works with manually supplied pwd
and uid
(#690).
Oracle: uses correct parent class (#685).
SQL Server: correctly enumerate schemas across databases in connections pane (@detule, #527).
SQL Server: now uses column type "BIGINT"
integer64 objects
(@simonpcouch, #698).
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).
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 gives a clear error if you supply multiple
arguments with the same name when case is ignored (#641).
DBI::dbConnect(odbc::odbc())
now automatically quotes argument values that need
it (#616).
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).
SQL Server
Improved handling for local temp tables in dbWrite()
, dbAppendTable()
,
and dbExistTable()
(@detule, #600)
Specialize syntax in sqlCreateTable
to avoid failures when
writing to (new) local temp tables. (@detule, #601)
Teradata: Improved handling for temp tables (@detule and @But2ene, #589, 590)
Various fixes for R CMD check
.
The argument order for sqlCreateTable()
methods avoiding weird argument
mismatch problems (#448).
Fixed truncation when retrieving unicode data stored in VAR/CHAR columns (@detule, #553).
Fixed issue related to fetching zero rows (@detule, #528).
Backend specific improvements:
DATE
to TIMESTAMP
(@schuemie, #555).Optimized table preview methods. Enhances large table preview within RStudio IDE (@detule, #525).
Added attributes
parameter to dbConnect(...)
. Can be used to pass a
token and authenticate against Azure AD when using Microsoft SQL Server.
Documented in ?ConnectionAttributes
(@detule, #521).
Fix length(x) = 3 > 1' in coercion to 'logical(1)
warning in connection
observer (@meztez, #494).
odbcDataType.Snowflake()
method for Snowflake databases. (@edgararuiz, #451)invalid descriptor
issues when retrieving results from SQL Server +
Microsoft's ODBC driver, using parametrized queries. (@detule, #414)dbQuoteString
now respects
this when called on a connection of class Hive
. (@rnorberg, #184)sqlCreateTable(con, ..., temporary = TRUE)
and con
is a
connection of class DB2/AIX64
, the CREATE TABLE
statement that is generated
properly creates a temporary table in DB2. The statement begins with
DECLARE GLOBAL TEMPORARY TABLE
and ends with ON COMMIT PRESERVE ROWS
(DB2's default behavior is
ON COMMIT DELETE ROWS
, which results in the inserted data being
deleted as soon as dbWriteTable
completes). (@rnorberg, #426)invalid descriptor
errors from drivers such as Microsoft SQLServer driver and the freeTDS driver which do not support out of order retrieval are now avoided.
This is done by unbinding any nanodbc buffer past the long column.
Performance for the unbound columns in these cases will be reduced, but the retrieval will work without error (@detule, #381)dbBind()
and dbFetch()
now support multiple result sets (@vkapartzianis, #234)dbAppendTable()
method for OdbcConnection objects (#335)dbQuoteIdentifier()
now uses the input names (if any).dbWriteTable()
and dbBind()
now default to a batch_rows
of NA
, which sets the batch size to be the length of the input.
This avoids problems with drivers that don't support batch sizes larger than the input size.
To restore the behavior prior to this release pass batch_rows = 1024
or set options(odbc.batch_rows = 1024)
(#391).dbWriteTable()
now handles data.table::IDate()
objects (#388)dbWriteTable(field.types=)
now issues a warning rather than an error for missing columns (#342)odbcConnectionColumns()
now works as intended with DBI::Id()
objects (#389)dbFetch()
now verifies that n
is a valid input.timezone
parameter (#398)Date
and POSIXct
types via DATE
and TIMESTAMP
data types (#324, #349, #350)dbWriteTable()
now executes immediately, which fixes issues with temporary tables and the FreeTDS SQL Server driver (@krlmlr).
blob roundtrips now work in more cases (#364, @krlmlr).
The BH dependency has been removed (#326)