Skip to content

Releases: r-dbi/odbc

odbc 1.7.0

Choose a tag to compare

@simonpcouch simonpcouch released this 12 May 13:33
7639a60

Databricks

  • databricks() now supports workload identity federation
    (#1002).

  • databricks() now detects service principal credentials
    when running on Posit Connect (@tnederlof, #931).

  • databricks() now has improved performance when the
    useNativeQuery connection attribute is set to true
    (#998).

  • databricks() driver location discovery now handles the
    new OEM driver for macOS (#994).

Snowflake

  • odbc::snowflake() now uses the snowflakeauth package to
    resolve connection parameters from Snowflake connections.toml
    and config.toml files under the hood, which improves support
    for non-OAuth authenticators (including "externalbrowser"
    authentication), adds support for the host field, allows
    multiple named connections (via the new connection_name
    argument), and generally improves compatibility with the
    Snowflake CLI and Python ecosystem (#1000).

  • sf_private_key is now robust to newline character ending
    (#997).

Miscellaneous

  • SQL Server: POSIXct data can now be written to
    DATETIMEOFFSET targets (#985).

  • odbcConnectionColumns(), odbcConnectionIcon(), and
    odbcConnectionActions() are now fully deprecated. Use
    DBI::dbListFields() instead of odbcConnectionColumns()
    (#986).

  • Fix crash when interrupting execution using Ctrl-c (#977).

  • Fix R error/crash when the params arguments are different
    lengths and one is POSIXt (#984). This forces all
    bound-parameters to be length 1 or the same length (i.e.,
    tidyverse recycling rules).

  • databricks() and snowflake() now correctly error (instead
    of warning) when the driver configuration file is not found
    (#1001).

odbc 1.6.4

Choose a tag to compare

@simonpcouch simonpcouch released this 08 Dec 14:41
14d2b10
  • Fix writing of [R] date/time values that have integer storage. (#952)

  • Oracle: Fix writing values to DATE targets. (#959)

  • SQL Server: Fix time zone interpretation in DATETIMEOFFSET data; now follows
    ISO 8061 convention where positive offset denotes time zone east of
    Greenwich. (#946)

odbc 1.6.3

Choose a tag to compare

@simonpcouch simonpcouch released this 05 Sep 19:27
47991e9

Addressed a compiler warning on r-devel-linux-x86_64-fedora-clang (#941).

odbc 1.6.2

Choose a tag to compare

@simonpcouch simonpcouch released this 29 Aug 12:53
e53f7fd
  • Fix hang when parsing exceptionally long database errors (#916).

  • Fix retrieving multiple result sets from parametrized queries in cases when some parameters yield empty results (#927).

  • Databricks and Snowflake:

    • The package will prefer shlib to locate statically built installations of unixodbc, correcting an issue with erroneously overwritten lines in simba.sparkodbc.ini (#921).
    • dbConnect() no longer errors on repeated calls (#901).
  • DB2:

    • DB2_XML support added (#913).
    • Fix error when writing to temp tables (#910).
  • Snowflake:

    • sf_private_key and sf_private_key_password connection attributes added to pass PEM formatted private key contents directly from memory (#933).
    • Corrected search paths for .ini files, so the package is now more likely to find configuration files by default (#937).
  • SQL Server:

    • Fix issues with argument propagation in bespoke S4 methods (#906).
    • DATETIMEOFFSET data type support added (#918).
    • data.frames can now bind to table valued parameters of stored procedures (#928).

odbc 1.6.1

Choose a tag to compare

@simonpcouch simonpcouch released this 27 Mar 14:54
9c622d9
  • odbc will now automatically find statically built installations of
    unixodbc (#899).

odbc 1.6.0

Choose a tag to compare

@simonpcouch simonpcouch released this 28 Feb 14:49
dcad567

New features

  • A hex logo has been added to the package (@edgararuiz, #824).

  • databricks() and snowflake() detect viewer-based credentials on
    Posit Connect (@atheriel, #853 and #894).

  • odbcEditDrivers(), odbcEditSystemDSN(), and odbcEditUserDSN()
    create shortcuts for file.edit(odbcListConfig()[[i]]) on macOS and
    Linux (@simonpcouch, #827).

  • New redshift() helper simplifies connections to Amazon Redshift clusters,
    particularly with IAM credentials (@atheriel, #879).

Bug fixes and minor improvements

  • Error messages rethrown from drivers no longer become garbled when raw messages
    contain curly brackets (@simonpcouch, #859).

  • SQL Server drivers installed with homebrew are now discovered automatically
    on ARM macOS (@stevecondylios, #893).

  • databricks(workspace) removes trailing slashes automatically, preventing
    uninformative driver messages (@simonpcouch, #827).

  • dbConnect() displays clear errors when unixODBC isn't found on macOS and
    Linux (@simonpcouch, #782).

  • dbConnect() adds name_encoding to complement encoding for separate
    column content and name encoding (#845).

  • dbListTables() and dbExistsTable() improve temp table support with DB2 (#823).

  • Netezza character and boolean columns receive improved data type
    inference (#847, #850).

  • Oracle DATE and TIMESTAMP(n) targets handle writes correctly with
    batch_size > 1 (#810).

  • snowflake() checks runtime driver configuration on macOS (#857).

  • snowflake() accepts uid without pwd when using
    authenticator = "externalbrowser" or authenticator = "SNOWFLAKE_JWT"
    (@simonpcouch, #817 and #889).

  • Resolved SQL Server data truncation in temp tables with FreeTDS (#866),
    writing issues with SIMBA drivers (#816), hms data roundtrip (#887),
    and precision when writing to DATETIME2 targets (#793).

odbc 1.5.0

Choose a tag to compare

@simonpcouch simonpcouch released this 05 Jun 19:12
9924af6

Major changes

  • New function snowflake() makes it easier to connect to Snowflake,
    automatically handling authentication correctly on platforms that provide
    Snowflake-native OAuth credentials (@atheriel, #662).

  • Long running queries can now be interrupted using Ctrl-C. This
    feature is enabled by default in interactive sessions. It can be
    controlled by the interruptible argument to dbConnect() or by the
    global option odbc.interruptible. Should be considered experimental---if
    you experience problems please file an issue on the package's GitHub
    repository (#796).

Minor improvements and bug fixes

  • Improved argument checking and transitioned to the cli package for
    formatting most existing error messages (@simonpcouch, #781, #784, #785, #788).

  • Raises "Cancelling previous query" warnings from R rather than from Rcpp when
    a connection has a current result to avoid possible incorrect resource
    unwinds with options(warn = 2) (#797).

  • Adjusted the default batch_rows value for dbWriteTable() and dbBind()
    methods. odbc 1.3.0 changed the default value from 1024 to NA, which sets the
    batch size to be the length of the input. While this addressed issues for
    some drivers when 1024 was greater than the number of rows, it also led
    to excessive memory consumption when the input was very large for some other
    drivers. The package will now interpet NA as the minimum of 1024 and the
    length of the input (@simonpcouch, #774).

  • The encoding of non-ASCII column names of SQL results is now always converted
    to UTF-8. (@shrektan, #430)

  • Improved error messages when the encoding of client and db-server are
    different. (@shrektan, #432)

  • dbListFields() now works with Id() and SQL() identifiers (#771).

  • Transitioned odbcDataType() to use S4 for consistency. S3 methods defined
    locally will need to be rewritten (@simonpcouch, #701).

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

  • A bug in the implementation of a new feature introduced in 1.4.2, where the
    package would automatically set the ODBCSYSINI environmental variable when
    using the unixODBC driver manager, was fixed; that environmental variable
    will now actually be set on package load (@simonpcouch, #792).

Driver specific changes

  • databricks() will now automatically configure the needed driver and driver
    manager on macOS (@simonpcouch, #651).

  • databricks() now picks up on Posit Workbench-managed Databricks
    credentials when rendering Quarto and RMarkdown documents in RStudio
    (@atheriel, #805).

  • Improved performance on write with Snowflake (#760).

  • Resolved issue when previewing tables using the RStudio Connections pane with
    Teradata (@simonpcouch, #755).

odbc 1.4.2

Choose a tag to compare

@hadley hadley released this 23 Jan 14:26
  • 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).

odbc 1.4.1

Choose a tag to compare

@hadley hadley released this 21 Dec 13:16
2f66e88
  • 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).

odbc 1.4.0

Choose a tag to compare

@hadley hadley released this 16 Dec 15:32

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

  • 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).

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).

  • 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)