Closed fywf555 closed 2 years ago
You need to point to the address of an existing database. The address there is just an example
I can't find it either
We write the Readme for this purpose
it is worked and use the default database;
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=ab.123456
camel.component.sql.dataSource.serverName=10.14.16.4:5432
camel.component.sql.dataSource=#class:org.postgresql.ds.PGSimpleDataSource
camel.source.path.query=select * from account
but i want to use another database,i try
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=ab.123456
camel.component.sql.dataSource.serverName=10.14.16.4:5432/test
camel.component.sql.dataSource=#class:org.postgresql.ds.PGSimpleDataSource
camel.source.path.query=select * from invoice
and failed
Change the database nane according to the name you need to point. The error is clear
i understand....it a silly question
No, it's not a silly question. We need to explain it better in the example. Let me improve the README.
The commit should explain a bit better how to do it. Thanks for asking. We're always trying to improve the documentation.
Open the SQL configuration file at $EXAMPLES/sql/sql-source/config/CamelSqlSourceConnector.properties
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=#class:org.postgresql.ds.PGSimpleDataSource
camel.source.path.query=select * from accounts
Please tell me how to select database
i try to use
but faild