You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/11 05:57:17 UTC

[camel-kafka-connector-examples] branch ckc-ex-sql-source created (now 17b656c)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch ckc-ex-sql-source
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector-examples.git.


      at 17b656c  SQL Source Connector: Add instruction on how to point to a different Database Name

This branch includes the following new commits:

     new 17b656c  SQL Source Connector: Add instruction on how to point to a different Database Name

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[camel-kafka-connector-examples] 01/01: SQL Source Connector: Add instruction on how to point to a different Database Name

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch ckc-ex-sql-source
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector-examples.git

commit 17b656c6cc79e819c13d7ed1b360dbbc1ea99172
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 11 06:57:13 2022 +0100

    SQL Source Connector: Add instruction on how to point to a different Database Name
    
    Fixes #330
---
 sql/sql-source/README.adoc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/sql/sql-source/README.adoc b/sql/sql-source/README.adoc
index b5ef272..436cb7e 100644
--- a/sql/sql-source/README.adoc
+++ b/sql/sql-source/README.adoc
@@ -128,6 +128,28 @@ camel.source.path.query=select * from accounts
 
 and add the correct IP for the container.
 
+NOTE: In case you'd like to use a different database name instead of the default one, you could add the following configuration parameter to your configuration file:
+
+[source]
+----
+name=CamelSqlSourceConnector
+connector.class=org.apache.camel.kafkaconnector.sql.CamelSqlSourceConnector
+key.converter=org.apache.kafka.connect.storage.StringConverter
+value.converter=org.apache.kafka.connect.storage.StringConverter
+
+topics=mytopic
+
+camel.component.sql.dataSource.user=postgres
+camel.component.sql.dataSource.password=mysecretpassword
+camel.component.sql.dataSource.serverName=172.17.0.2
+camel.component.sql.dataSource.databaseName=dbname
+camel.component.sql.dataSource=#class:org.postgresql.ds.PGSimpleDataSource
+
+camel.source.path.query=select * from accounts
+----
+
+In this way you'll be able to point to a different database name.
+
 === Running the example
 
 Run the kafka connect with the SQL Source connector: