← Back to all sparks
K

kwb.db

ANALYTICS
Velocity0.0

Functions supporting data base access

A water-research lab's ODBC helper, still fighting Windows database drivers a decade in.

database-accessodbcresearch-infrastructurer-packagewindows-compatibility
Current state
kwb.db is internal tooling from Kompetenzzentrum Wasser Berlin that wraps ODBC access to MS Access and similar databases for the lab's R workflows. Its functionality covers schema inspection, relation reading and database dumps, with a long-standing preoccupation with the 32-bit versus 64-bit driver split on Windows. The most recent release pins a newer RODBC to fix Windows installation.
Where it's heading
The visible history is dominated by driver plumbing rather than features. Early versions added a bridge for calling 32-bit ODBC drivers from a 64-bit R session, then reversed course once 64-bit drivers shipped with MS Office, preferring RODBC directly and falling back only when needed. Later work exposed more of the internals — dumpDatabase, SQL builders, then schema and relation readers — turning a connection helper into something closer to a metadata extractor. The 2025 release is pure survival, and its note candidly records that Ubuntu and macOS installs still fail in CI.
Prediction
Expect the next release to respond to another RODBC or driver breakage rather than to add functionality, given that installation has been the binding problem across the last several releases.

Recent moves

  1. 1y ago

    Newer RODBC pinned to fix Windows installation

    Pins a newer RODBC build to fix Windows installation failures, while stating plainly that Ubuntu and macOS installs still fail in GitHub Actions. Keeping the package installable on its primary platform is the whole content of this release.

    View source ↗
  2. 2y ago

    Schema and relation readers exported

    Exports read_schemata(), read_relations() and merge_relations(), pushing the package past connection handling into reading a database's structure and relationships. The most substantive functional addition in the visible history, though the release note gives it a single line.

    View source ↗
  3. 2y ago

    32-bit ODBC drivers reachable from 64-bit R

    Allows a 32-bit Windows ODBC driver to be used from a 64-bit R session, addressing the architecture mismatch that made MS Access databases unreachable from modern R installs. Despite carrying an older version number than its neighbours, this tag was published in the same two-minute batch as 0.5.0, 0.6.0 and 0.7.0.

    View source ↗
  4. 2y ago

    RODBC preferred over the 32-bit bridge

    Reverses the previous approach now that 64-bit RODBC drivers ship with newer MS Office versions: RODBC is tried first and the 32-bit bridge becomes the fallback. Also exports dumpDatabase(), sqlForSelectByKey() and sqlForUpdate().

    View source ↗
  5. 2y ago

    Extra arguments for schema reading and dumps

    Adds tableNames and tableTypes arguments to getDatabaseSchema(), an as.is argument to dumpDatabase(), and a sqlColumns() attempt in hsFields() before erroring. Incremental argument additions to existing functions.

    View source ↗