castorm/kafka-connect-http

Node not found - parse error - flat arry

Opened this issue · 0 comments

The data payload coming from the HTTP Endpoint does not have a "root" level key. The JSON array is flat.

[{key:value, key:value, key:value} , {key:value, key:value, key:value} ]

Error thrown is :

[2024-02-02 13:29:29,257] ERROR WorkerSourceTask{id=netreo-beta-test-2.http.source-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:191)
java.lang.IllegalArgumentException: No node at '/create_time' (unmatched part: '/create_time')

Here is my config:

{
"name": "netreo-beta-test-2.http.source",
"config": {
"connector.class": "com.github.castorm.kafka.connect.http.HttpSourceConnector",
"tasks.max": "1",
"http.offset.initial": "timestamp=2020-05-08T07:55:44Z",
"http.request.params": "jql=create_time>=${offset.timestamp?datetime.iso?long}",
"http.request.url": "https://qa-system/fw/index.php?r=restful/devices/list",
"http.request.headers": "Accept: application/json",
"http.auth.type": "Basic",
"http.auth.password": "PASSWORD",
"http.response.record.offset.pointer": "key=/, timestamp=/create_time",
"http.timer.interval.millis": "30000",
"http.timer.catchup.interval.millis": "1000",
"kafka.topic": "beta-test-2"
}
}
~