Repository navigation
Releases
Releases · gizmodata/adbc-driver-db2
v0.3.0
Option names now follow the ADBC driver style guide.
The old names keep working, with a deprecation warning.
Changed
- Option names: every driver-specific option moved from
adbc.db2.*(theadbc.prefix is reserved for the ADBC specification's own options) to thedb2.vendor prefix, grouped as the style guide asks: query behaviour underdb2.query.*, bulk ingest underdb2.ingest.*, plusdb2.tls.*,db2.auth.*,db2.session.*anddb2.package.*. Specification options (uri,username,password,adbc.connection.*,adbc.statement.*,adbc.ingest.*) are unchanged. Old name → new name:adbc.db2.host→db2.hostadbc.db2.port→db2.portadbc.db2.database→db2.databaseadbc.db2.tls→db2.tlsadbc.db2.tls.ca_cert→db2.tls.ca_certadbc.db2.tls.skip_verify→db2.tls.skip_verifyadbc.db2.security_mechanism→db2.auth.security_mechanismadbc.db2.security_mechanism_active→db2.auth.security_mechanism_activeadbc.db2.current_schema→db2.session.current_schemaadbc.db2.application_name→db2.session.application_nameadbc.db2.connect_timeout→db2.connect_timeout_secondsadbc.db2.query_block_size→db2.query.block_sizeadbc.db2.batch_size→db2.query.batch_rowsadbc.db2.batch_bytes→db2.query.batch_bytesadbc.db2.trace→db2.traceadbc.db2.trace_file→db2.trace.fileadbc.db2.package→db2.packageadbc.db2.no_auto_bind→db2.package.no_auto_bindadbc.db2.ingest.varchar_length→db2.ingest.varchar_lengthadbc.db2.ingest.batch_rows→db2.ingest.batch_rows
- Error messages start with the driver's slug,
[db2] …, as the style guide asks (they started withdb2:,[Db2]or nothing). - URI parameters:
batch_rows,block_sizeandconnect_timeout_secondsare accepted alongsidebatch_size,query_block_sizeandconnect_timeout, matching the new option names. A URI that sets one setting to two different values, under two names (tls/ssl,secmec/security_mechanism,batch_size/batch_rows, …), two spellings (TLS/tls) or one name twice, is now refused withINVALID_ARGUMENTnaming the parameters (never their values); before, which one won was random. The same value twice is fine. - Upgrade note, current schema:
db2.session.current_schema(adbc.db2.current_schema) and?schema=were ignored before 0.3.0 and are now applied when the connection opens. The schema must exist, or the connect fails withNOT_FOUND([db2] schema "X" does not exist), the same checkadbc.connection.db_schemamakes; the name is used as given (quoted), soschema=salesmeans the lower-case schemasales. Remove the option, or fix its case, if a connection that worked on 0.2 now fails. - Python:
DatabaseOptionscarries the new names (member names unchanged) and gainsTRACE_FILE,PACKAGEandNO_AUTO_BIND;ConnectionOptions.SECURITY_MECHANISM_ACTIVEandStatementOptions.INGEST_VARCHAR_LENGTH/INGEST_BATCH_ROWSreplace the reserved placeholders. Thedbapi.connectdocstring no longer names options this driver doesn't have. - README and PyPI page: a badge stating the driver follows the ADBC driver style guide. The PyPI page (
python/README.md) carries the repository README's branding (badge row with PyPI version, Python versions and downloads, tagline, GizmoData footer and trademark line), with absolute links and image URLs so PyPI shows them, and an Options section. - PyPI page: the package's description on PyPI is now its own Python-only page,
python/README.md(install, requirements, connect and query, streaming, loading the driver by name), linking to the repository README for other languages, the one-line installer and the full reference; the repository README keeps everything.python/tests/test_pypi_readme.pyruns every Python example on that page against the live database. - README: installing without Python is one line,
curl https://install.adbc.gizmodata.com/db2 | sh(Linux, macOS) orirm https://install.adbc.gizmodata.com/db2.ps1 | iex(Windows): it installs the release's shared library, checked against itsSHA256SUMS, and adb2driver manifest, so any ADBC driver manager loads it asdriver = "db2"(gizmodata/adbc-install). - CI: a change that touches only documentation (
*.md,docs/,LICENSE,NOTICE) skips the build and test jobs, and one job,CI result, reports on every run and is the only required check. The glibc-2.28 install check retriesdnf installwith fresh metadata, so a mirror serving a brokenrepomd.xmlcan't fail a build. - Dependencies: Apache Arrow Go v18.8.0 → v18.9.0, klauspost/compress v1.20.0 → v1.20.5, pierrec/lz4 v4.1.29 → v4.1.33, go.yaml.in/yaml v3.0.5 → v3.0.6, golang.org/x/tools v0.52.1-pre → v0.53.0, golang.org/x/exp to 2026-11-20;
toolchain go1.27.4ingo.mod(thegodirective stays 1.26.7) and Go 1.27.4 in CI; zig 0.17.1 for the glibc-2.17 Linux builds; test extras hardcharger[adbc] ≥ 2.13.3 and duckdb ≠ 2.0.1 (released today, and Query.Farm has noadbc_scannerbuild for it yet); the adbc-drivers.org validation suite moved to e4c18a5.
Fixed
- On Windows, the driver manifest that
python -m adbc_driver_db2 install-manifestwrites also names the library underwindows_<arch>_mingw, the key R'sadbcdrivermanager(built with MinGW) looks up, so loading the driver by name from R on Windows works (gizmodata/adbc-install#10). Run it again to update an existing manifest. - Current schema on connect:
db2.session.current_schema(formerlyadbc.db2.current_schema) and the URI'sschema=parameter were parsed but never applied; the connection now checks the schema exists and runsSET CURRENT SCHEMAwhen it opens, as documented (see the upgrade note above). - Security: passwords in URIs. A URI that fails to parse was echoed whole in the error, password included (
[db2] invalid URI "db2://admin:Pa%ss%word@…"), and a password with an unencoded/could surface in an "invalid port" error. Errors now describe the problem without quoting the URI. Reading theurioption back (GetOption("uri")) returned the password; it now returns the URI with the password, in the user info and inpassword=/pwd=parameters, shown asxxxxx(a URI that does not parse is not returned). - Tracing:
db2.trace=false(or?trace=false) together with a trace file turned tracing on or off at random; an explicit trace setting now always decides, and a trace file alone still turns tracing on.
Deprecated
- The
adbc.db2.*names above still work, both to set an option and to read it back with GetOption. The first use of each old name in a process writes one line to stderr,[db2] option "adbc.db2.batch_size" is deprecated; use "db2.query.batch_rows"; the line names the keys only, never the value. When one call (the options given toNewDatabase/db_kwargs, or oneSetOptions) carries both names, the new one wins, whatever the order; across separateSetOptioncalls the last write wins, under either name, and every value is validated. Errors about an old name name the key you wrote.
What's Changed
- CI: skip heavy jobs for docs-only changes; one required check (CI result) by @prmoore77 in #4
- README: install without Python in one line (install.adbc.gizmodata.com) by @prmoore77 in #6
- Windows manifest also names the library for MinGW driver managers (R) by @prmoore77 in #7
- Release 0.3.0: option names follow the ADBC driver style guide; dependency bumps by @prmoore77 in #8
Full Changelog: v0.2.6...v0.3.0
v0.2.6
Changed
- README: the PyPI page shows the ADBC conformance badge: the adbc-drivers.org validation suite runs in CI, and every release waits for it.
No code changes.
What's Changed
- Release v0.2.6: ADBC conformance badge (README and PyPI) by @prmoore77 in #3
Full Changelog: v0.2.5...v0.2.6
v0.2.5
The shared library and wheels now follow the
ADBC shared-library requirements,
and the wheels' platform tags describe the library inside them.
Fixed
- The 0.2.4 Linux and macOS wheels were tagged wrong. The Linux wheels said
manylinux2014(glibc 2.17), but their library needed glibc 2.34, so pip installed them on
RHEL/Oracle Linux/AlmaLinux 8 and similar, where the driver then failed to load
(version `GLIBC_2.32' not found). The macOS wheel saidmacosx_12_0_universal2, but its
library is arm64-only and built with Go 1.27, which supports macOS 13 and later. The Linux
library is now built against glibc 2.17 (zig cc), the macOS wheel is tagged
macosx_13_0_arm64(its library's minimum is 13.0), and CI checks the glibc ceiling, the
macOS minimum and every wheel's tag, and installs and loads the Linux wheels on AlmaLinux 8. - The library exports only
Adbc*symbols, plus the deprecatedDb2DriverInit. It also
exported ~70-250 internal names (Db2DatabaseNewand the rest of the Go wrapper, cgo glue such
as_cgo_*andcrosscall2).scripts/checkexportsverifies the exports on every platform in CI.
Changed
- The GitHub Release attaches
libadbc_driver_db2-<os>-<arch>.tar.gzarchives (with a
.sha256each, andSHA256SUMS) holdinglibadbc_driver_db2.so/.dylib/.dll,LICENSE
andNOTICE, instead of bare libraries namedlibadbc_driver_db2-<os>-<arch>.<ext>. The
ADBC driver manager derives the entrypoint from the file name, so the old names pointed it at
AdbcDriverDb2LinuxAmd64Initand the like. - The Python package, the driver manifest written by
install-manifest, the README and the tests
use the entrypointAdbcDriverDb2Init(the one the driver manager derives from the file name).
Deprecated
- The
Db2DriverInitentrypoint. It still works (existing manifests and code keep loading),
and will be removed in 1.0. UseAdbcDriverDb2Init, or leave the entrypoint out.
What's Changed
- Release v0.2.5: meet the ADBC shared-library requirements; fix wheel tags by @prmoore77 in #2
Full Changelog: v0.2.4...v0.2.5
v0.2.4
The driver now passes the open ADBC validation suite
against a real Db2, and the suite runs in CI as a release gate. It found the bugs below.
Fixed
- LOB values in NOT NULL columns lost their first byte. A
BLOB/CLOBread from a
NOT NULL column (or expression, e.g.CAST(... AS BLOB)) came back without its first byte:
the driver stripped a null-indicator byte that DRDA only sends for nullable LOB columns. - Empty LOBs (
BX'',''asBLOB/CLOB) failed the fetch ("cannot store drda.LobRef")
or came back as the text{true}; they now read back as empty values. CHAR/VARCHAR/LONG VARCHAR FOR BIT DATAcolumns are Arrowbinary, as their bytes
are not text. They wereutf8columns holding invalid UTF-8.- Time-zone-aware timestamps are bound and ingested as UTC. They were stored as wall time in
the Arrow type's display zone, so the stored value depended on display metadata (and
9999-12-31 23:59:59 UTCoverflowed inAsia/Tokyo). - An Arrow time with a fractional second is refused when binding to Db2
TIME(whole-second
precision) instead of being silently truncated. - Bulk ingest: values longer than a
VARCHARcan hold (32,672 bytes) get aCLOB/BLOBcolumn
instead of failing every row with SQL0302N; a negative decimal scale (decimal(2,-2)) becomes
DECIMAL(4,0)holding the same values (it produced invalid DDL);createon an existing table fails withALREADY_EXISTS(wasINTERNAL); appending
data with a column the table lacks fails withALREADY_EXISTSbefore inserting (was a
NOT_FOUNDfrom the INSERT); appending to a missing table isNOT_FOUND. GetObjectslistsCHECKconstraints (it read onlySYSCAT.KEYCOLUSE, which has none).- An unknown database option is refused with
NOT_IMPLEMENTEDinstead of being ignored, so a
misspelled option fails (standardadbc.connection.*/adbc.statement.*keys are still
accepted on the database). Settingadbc.connection.db_schemato a schema that does not exist
fails withNOT_FOUND(Db2 accepts it silently). GetInforeports the linked arrow-go release (e.g.v18.8.0) as the driver's Arrow version,
notarrow-go/v18.
Added
validation/: the ADBC validation suite (pinned by commit; a test dependency only) with this
driver's Db2 quirks and per-case query overrides, each with its reason. A new CI job runs it
against a Db2 container, and the PyPI publish and GitHub Release now wait on it. It fails,
never skips, when the server is unreachable or nothing passes.
Changed
- Dependencies: golang.org/x/{exp,mod,sync,sys,tools}, goccy/go-json 0.12.0 and
klauspost/cpuid 2.4.2 (arrow-go 18.8.0 and arrow-adbc 1.13.0 are already the latest; CI's
Go 1.27.3 is the latest release). Test extras: pytest 9.2, pandas 3.1.1, Hardcharger 2.10;
build backend setuptools 84.2.1. The runtime floors (adbc-driver-manager,pyarrow) and
Python 3.10 support are unchanged.
What's Changed
- Tests: name the protocol Chargewire in the adbc_scanner docstring by @prmoore77 in #1
New Contributors
- @prmoore77 made their first contribution in #1
Full Changelog: v0.2.3...v0.2.4
v0.2.3
Added
- Python 3.15: tested in CI (every OS the tests run on) and listed in the package classifiers.
Every dependency, test extras included, installs on it.
Full Changelog: v0.2.2...v0.2.3
v0.2.2
Changed
- The README's cross-tool examples and the cross-tool tests use
Hardcharger (GizmoData's DuckDB 2.0 server) instead of
GizmoSQL: Db2 → Hardcharger streaming ingest, andadbc_scannerreads and writes run both
inside a Hardcharger server and in an embedded DuckDB. Test settings are now
ADBC_DB2_TEST_HARDCHARGER_*; without them the tests start a server from thehardcharger
PyPI package (pip install -e ".[test,hardcharger]"). The driver itself is unchanged. - README:
adbc_scannerfor DuckDB 2.0 and later (and so Hardcharger) installs from the Query.Farm
extension repository, and its function API takes the attached database's name
(adbc_scan('db2', ...)); the extension removedadbc_connect/adbc_disconnect, which the
old example and tests still used. Batch sizing is described against Hardcharger's 64 MiB ingest
message limit. - Dependencies: arrow-adbc Go 1.13.0 (was 1.12.0), arrow-go 18.8.0 (was 18.7.0) and their
dependencies. CI builds with Go 1.27.3 (was 1.26.7; the module's Go 1.26 floor is unchanged).
Test extras: pytest 9.1, DuckDB 2.0 and pandas 3.1 (Python 3.10 keeps their last releases for
it). The runtime floors (adbc-driver-manager,pyarrow) are unchanged, so the wheel still
installs next to older versions.
Full Changelog: v0.2.1...v0.2.2
v0.2.1
Fixed
- SQL0805N (package not found) now says why the package could not be
created. When the dynamic-SQL package (defaultNULLID.SYSSH200) is
missing, as on Db2 for i / z/OS, the driver binds it automatically; if
that bind failed (e.g. SQL0552N, no authority to bind, or theNULLID
library missing on Db2 for i), the failure was swallowed and only a
bareSQLCODE=-805 ... NULLID.SYSSH200reached the caller. The error
now includes the bind failure plus remediation (have a DBA create the
package, or setadbc.db2.packageto a collection you may bind in),
and ADBC errors keep context wrapped around the SQLCA. - Bind failures report the server's SQLCA (the actual reason) instead
of the genericBGNBNDRMreply message. - Multi-token SQLCA messages from Db2 LUW (tokens separated by
0xFF)
are no longer decoded as EBCDIC garbage (+!âñ+à→NOBIND, BIND).
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Fixed
- Security — an explicit
adbc.db2.security_mechanismnow fails
closed. Previously, when the server refused the configured SECMEC,
the driver silently renegotiated with whatever the server offered — so
explicitly requesting9(Diffie-Hellman encrypted credentials)
against a server that only accepts3transmitted the password in
cleartext anyway. Now an explicitly configured mechanism errors with
"refusing to downgrade" instead; the automatic default (no option set)
still negotiates the strongest mechanism the server offers. Verified
at the wire-byte level (test_security.py) — with an explicit
secmec=9the password never leaves the client.
Added
- Read-only connection option
adbc.db2.security_mechanism_active
reporting the SECMEC actually negotiated for the session (e.g."9",
"3"), plusadbc.db2.batch_size/adbc.db2.batch_bytesare now
readable viaGetOption. - Documentation: SECMEC protects credentials only — data in transit is
protected by TLS, not by the DRDA security mechanism.
Changed
adbc.db2.batch_bytesnow defaults to 8 MiB (was unlimited), so a
single Arrow record batch always fits under common transport limits —
in particular Flight SQL's 16 MiB gRPC message cap when streaming wide
tables straight intoadbc_ingeston another driver. Batches are
still capped atbatch_sizerows (default 65,536); set
batch_bytes=0to restore unlimited batches.- CI: semver pre-release tags (e.g.
v1.0.0-rc1) now create pre-release
GitHub Releases.
Full Changelog: v0.1.12...v0.2.0
v0.1.12
Added
batch_bytesURI parameter /adbc.db2.batch_bytesoption: approximate
upper bound on bytes per Arrow record batch (default 0 = onlybatch_size
applies), mirroring the Oracle driver. Wide tables streamed into GizmoSQL
(adbc_ingest(data=cursor.fetch_record_batch())) previously overflowed
the Flight SQL client's 16 MiB gRPC message cap with the default
65,536-row batches;?batch_bytes=8388608now keeps every batch under it
regardless of row width. Verified end-to-end against live Db2 + GizmoSQL.
Changed
- README: document tuning
batch_bytes/batch_sizewhen streaming wide
tables into GizmoSQL.
Full Changelog: v0.1.11...v0.1.12
v0.1.11
Added
- README +
test_adbc_scanner.py: document and test writing back to Db2
through the attached catalog with plain SQL (USE db2.<schema>; CREATE TABLE ... AS SELECT) and via theadbc_insert()function — both
verified against a live Db2 server.
Full Changelog: v0.1.10...v0.1.11