Closed Deepak-Vohra closed 7 years ago
Hello Deepak,
Sorry for the delay, we we will see this issue and study a release with a hotfix in the next days.
Regards
Thanks for the update. The fix should not modify the SQL syntax for MySQL as for MySQL an error is not generated.
Hello Depak I'm trying to reproduce the behaviour but the source with oracle seems to work fine. Can you show us the properties used in your tests?
thanks
flume.conf for Oracle Database to HDFS. agent1.channels.ch1.type = memory agent1.sources.sql-source.channels = ch1 agent1.channels = ch1 agent1.sinks = HDFS
agent1.sources = sql-source agent1.sources.sql-source.type = org.apache.flume.source.SQLSource
agent1.sources.sql-source.connection.url = jdbc:oracle:thin:@127.0.0.1:1521:ORCL
agent1.sources.sql-source.user = OE
agent1.sources.sql-source.password = OE
agent1.sources.sql-source.table = WLSLOG
agent1.sources.sql-source.database = ORCL
agent1.sources.sql-source.columns.to.select = *
agent1.sources.sql-source.incremental.column.name = id
agent1.sources.sql-source.incremental.value = 0
agent1.sources.sql-source.run.query.delay=10000
agent1.sources.sql-source.status.file.path = /var/lib/flume agent1.sources.sql-source.status.file.name = sql-source.status
agent1.sinks.HDFS.channel = ch1 agent1.sinks.HDFS.type = hdfs agent1.sinks.HDFS.hdfs.path = hdfs://10.0.2.15:8020/flume/oradb agent1.sinks.HDFS.hdfs.file.Type = DataStream
The issue is fixed, may close the issue.
The error was due to wrong class name in flume.conf.
agent1.sources.sql-source.type = org.apache.flume.source.SQLSource
Should be:
agent1.sources.sql-source.type = org.keedio.flume.source.SQLSource
Seems to be an error in the SQL syntax. The ';' should not be added at end of query. Oracle database generates error with ';' at SQL end.
(PollableSourceRunner-SQLSource-OrclSource) [INFO - org.apache.flume.source.SQLSource.process(SQLSource.java:100)] Query: SELECT * FROM wlslog WHERE id>-1 ORDER BY id; 2015-09-16 11:07:02,896 (PollableSourceRunner-SQLSource-OrclSource) [ERROR - org.apache.flume.source.SQLSource.process(SQLSource.java:157)] SQL exception, check if query for source OrclSource is correctly constructed java.sql.SQLSyntaxErrorException: ORA-00911: invalid character