Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IBM DB2 Driver #2990

Open
eucariop opened this issue Nov 7, 2024 · 2 comments
Open

Add IBM DB2 Driver #2990

eucariop opened this issue Nov 7, 2024 · 2 comments
Labels
enhancement sql Issues relating to the sql components

Comments

@eucariop
Copy link

eucariop commented Nov 7, 2024

Hello

There is IBM DB2 driver for benthos seems the right tool for it.

I don't know what is the criteria for adding a new driver.

Cheers!

@mihaitodor mihaitodor added enhancement sql Issues relating to the sql components labels Nov 7, 2024
@mihaitodor
Copy link
Collaborator

Hey @eucariop 👋 It's on our radar, thanks for asking! Unfortunately, the official driver requires CGo, which means that it will have to be part of a separate build similar to the zmq4 components.

@eucariop
Copy link
Author

eucariop commented Nov 8, 2024

Thanks @mihaitodor for the feedback, another factor to consider is CGO requires. If a CLI driver is already present on your system, it is advisable to set the following environment variables with the path of the CLI driver in a Docker environment.
From my understanding, it is not currently feasible to inject a new driver into existing SQL components. However, I believe this could be beneficial in this case, as well as for DB2 and similar scenarios.
My understanding is that the initial goal was to provide a mechanism that works on all platforms that support Go build to create their plugin and then have to determine the best method for installing the produced binary somewhere on their system (or in a Benthos or RedPanda Connect Docker container where RedPanda Connect can access it), it is unclear what the specific benefit of enabling this alternative plugin system over the existing one would be. Currently, Benthos can be imported as a library.

package main

import (
    _ "github.com/ibmdb/go_ibm_db"
    "database/sql"
    "fmt"
)
...
...


Reference Interface for GoLang to DB2
https://medium.com/@janeman98/quick-start-in-accessing-db2-for-z-os-from-go-application-d4561f53e91b
https://zhimin-wen.medium.com/talking-to-ibm-db2-with-golang-dad8bb6ee4b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement sql Issues relating to the sql components
Projects
None yet
Development

No branches or pull requests

2 participants