Skip to content

feat(examples): add ibm_db2i community connector#32

Open
fivetran-clgritton wants to merge 8 commits into
fivetran:mainfrom
fivetran-clgritton:feature/ibm_db2i
Open

feat(examples): add ibm_db2i community connector#32
fivetran-clgritton wants to merge 8 commits into
fivetran:mainfrom
fivetran-clgritton:feature/ibm_db2i

Conversation

@fivetran-clgritton

@fivetran-clgritton fivetran-clgritton commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Adds connector for IBM DB2 for i (IBM i / AS400) via pyodbc and the IBM i Access ODBC Driver. Includes full template formatting, CHECKPOINT_INTERVAL + BATCH_SIZE constants, drivers/installation.sh, and README.

Description of Change

The existing ibm_db2 example doesn't directly work for Db2 for i. Additionally, using the IBM ODBC driver with pyodbc seems to be faster in my testing. I'm creating a new basic community connector for Db2i using the ODBC driver.

Testing

Tested in Fivetran_Sales_Sandbox:
image

Checklist

Some tips and links to help validate your PR:

  • Tested by deploying to sandbox.
  • Added/Updated example-specific README.md file, see the README template for the required structure and guidelines.
  • Followed Python Coding Standards, refer here

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new community connector example for IBM Db2 for i (IBM i / AS400) using pyodbc + the IBM i Access ODBC Driver, including setup assets and documentation, and links it from the repo root README.

Changes:

  • Added ibm/ibm_db2i example connector (connector.py) that batches DB reads via fetchmany() and upserts to a customer table.
  • Added supporting artifacts (requirements.txt, configuration.json, driver install script) plus an example-specific README.md.
  • Updated the repo root README.md to include the new connector in the examples list.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
README.md Adds the new ibm_db2i entry to the connector examples list.
ibm/ibm_db2i/requirements.txt Declares pyodbc dependency for the example connector.
ibm/ibm_db2i/README.md Documents setup, configuration, and behavior for the Db2 for i connector example.
ibm/ibm_db2i/drivers/installation.sh Provides a Debian/Ubuntu install script for IBM i Access ODBC + unixODBC.
ibm/ibm_db2i/connector.py Implements the connector (ODBC connect, batching, upserts, checkpointing).
ibm/ibm_db2i/configuration.json Adds placeholder configuration values for community distribution.

Comment thread ibm/ibm_db2i/connector.py
Comment thread ibm/ibm_db2i/connector.py Outdated
Comment thread ibm/ibm_db2i/connector.py
Comment thread ibm/ibm_db2i/connector.py
Comment thread ibm/ibm_db2i/connector.py Outdated
Comment thread ibm/ibm_db2i/README.md Outdated
Comment thread ibm/ibm_db2i/README.md Outdated
Comment thread ibm/ibm_db2i/drivers/installation.sh Outdated
Comment thread ibm/ibm_db2i/drivers/installation.sh Outdated
Comment thread ibm/ibm_db2i/README.md

@fivetran-sahilkhirwal fivetran-sahilkhirwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please check copilot comments
Rest everything looks good

@fivetran-JenasVimal fivetran-JenasVimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good , please make these minor changes
Please address the co-pilot comments as well
Thank you

Comment thread ibm/ibm_db2i/README.md Outdated
Comment thread ibm/ibm_db2i/README.md
Comment thread ibm/ibm_db2i/connector.py Outdated
Comment thread ibm/ibm_db2i/connector.py
Comment thread ibm/ibm_db2i/connector.py Outdated

@fivetran-JenasVimal fivetran-JenasVimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good ,
Please address the failing checks and receive approval from Tech Writers

@fivetran-JenasVimal

Copy link
Copy Markdown
Contributor

Hi @fivetran-clgritton

Could you please rebase your PR so that the latest checks can run and pass

Thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few suggestions. Thanks

Comment thread ibm/ibm_db2i/README.md Outdated
Comment thread ibm/ibm_db2i/README.md
Comment thread ibm/ibm_db2i/README.md Outdated
Comment thread ibm/ibm_db2i/README.md Outdated
fivetran-clgritton and others added 7 commits July 6, 2026 10:53
Adds connector for IBM DB2 for i (IBM i / AS400) via pyodbc and the IBM i Access ODBC Driver. Includes full template formatting, CHECKPOINT_INTERVAL + BATCH_SIZE constants, drivers/installation.sh, and README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Apply black formatting (blank line, long line wrap)
- Rename timeout -> timeout_seconds for unit clarity
- Increase CHECKPOINT_INTERVAL to 10000 and DEFAULT_TIMEOUT_SECONDS to 60

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Add per-line comments to stdlib imports
- Make constants private (__BATCH_SIZE, __CHECKPOINT_INTERVAL, __DEFAULT_TIMEOUT_SECONDS)
- Update schema() docstring URL to new format
- Validate port type in validate_configuration()
- Narrow Exception to OSError in test_tcp()
- Thread state through fetch_and_upsert_data() and use in checkpoints
- Add final op.checkpoint() after fetch loop
- Validate db_schema against allowlist to prevent SQL injection
- Add timeout_seconds to README configuration parameters
- Add Windows/macOS to README Requirements
- Fix "Setup Guide" capitalization in Getting started
- Fix Features: checkpoints every CHECKPOINT_INTERVAL rows, not per batch
- Expand Tables created section with primary key guidance
- Fix installation.sh: set -euo pipefail, remove apt-get update || true
- Apply black line-length 99 formatting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds table-namespaced state key (customer_last_update_timestamp) and
parse_state_timestamp helper to enable incremental syncs after the
initial full load. Updates README data handling section to describe
the incremental strategy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: fivetran-chinmayichandrasekar <chinmayi.chandrasekar@fivetran.com>

@fivetran-JenasVimal fivetran-JenasVimal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread ibm/ibm_db2i/ibm-iaccess_1.1.0.29-1.0_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants