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

example of a sql source connector url pattern #1144

Closed
cstmgl opened this issue Apr 15, 2021 · 2 comments
Closed

example of a sql source connector url pattern #1144

cstmgl opened this issue Apr 15, 2021 · 2 comments

Comments

@cstmgl
Copy link

cstmgl commented Apr 15, 2021

Hi all, I'm sorry this is not an issue but a request for information/documentation.
I did not find a better place to ask.

I'm pretty new, and must say a bit confused, about camel connectors
I got here because I did not want to use the confluent connectors for rest/jdbc and I'm looking for alternatives and found some hits pointing here in some web searches.

Basically I'm trying to see if I need to build my own jdbc source connector extending the camel ones but I'm a bit lost in all the auto generated code. (I noticed there is no jdbc source but there is a sql source one)

Worst is online I could not find any example of how to create a simple source connector for camel.
Where do I put the jdbc/sql url?

Mainly I want to connect to oracle as my source system and I would like to HikariCP to manage my db connection but I'm a bit lost where to start.
The reason for using the hikari is that I want to be able to use the "connectionInitSql" part because I need to execute some connection sql script.

Can someone point me to some example or tutorial on how to use a kafka camel source connector?
Also is there a specific reason why for jdbc you provide only sink and no source?

@orpiske
Copy link
Contributor

orpiske commented Apr 15, 2021

Hello @cstmgl

If I remember correctly, I think the reason we don't have a JDBC source connector is because we would need to rely on a timer component for polling the database in a regular interval. However, I believe that this would be complex enough to deviate from our aim of providing a set of connectors that are simple to get started.

In such case, doing so with a regular route based on Camel Core, Camel K or Camel Quarkus usually provides a simpler way to achieve the desired result. Based on the preliminary description of your problem, I can't help but wonder if a project like Debezium wouldn't solve the problem as well.

That said we keep a library of examples in a separate project. They are available here: https://github.com/apache/camel-kafka-connector-examples/. They should cover a large range of connectors that we have tested and verified. We also have some integration tests that show how we solve edge cases or more complex scenarios.

@cstmgl
Copy link
Author

cstmgl commented Apr 16, 2021

thank you we can close this ticket, the example helps me, sorry I did not find it on my own but the examples help, I think indeed maybe Debezium is a bit better choice for me. thank you for the support

@cstmgl cstmgl closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants