-
Notifications
You must be signed in to change notification settings - Fork 432
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
ConnectException: Cannot create mapping when using RegexRouter/TimestampRouter SMT #99
Comments
Probably related to: https://issues.apache.org/jira/browse/KAFKA-5567 |
is there a workaround for this? |
Can anyone comment on what is the workaround for this issue? or when can this will be resolved? |
This works fine now as of Apache Kafka 2.0 / Confluent Platform 5.0 |
Hey @rmoff , same problem here :( |
@mattferroni which version are you running? The options as I see it for you are:
|
Running Kafka 1.0, I finally scripted it (manually) -- thanks anyway! |
FWIW, I'm still seeing this issue with Kafka 2.0 and kafka-connect-elasticsearch-5.0.0.jar. I'd like to apply
|
Hey @gunnarmorling :) Can you share your full sink config? |
@rmoff, of course, here it is:
I have also an executable reproducer, if you'd like to take a look: https://github.com/gunnarmorling/debezium-examples/tree/kafka-connect-elasticsearch-99/unwrap-smt Check out that branch and follow the steps in https://github.com/gunnarmorling/debezium-examples/blob/kafka-connect-elasticsearch-99/unwrap-smt/reproducer.md. Registering the sink connector fails due to an upper-case index name, which should have been transformed by means of the regex router. Just verified it's using Kafka 2.0 and ES sink 5.0.0. Maybe I'm also doing some silly mistake here? |
@gunnarmorling I reproduced your problem using the steps provided. However, I think it's different from the original problem in this ticket. Whereas before, Kafka Connect was applying the RegEx SMT but not creating the target ES index, what seems to be happening in your case is that it's simply not applying the RegEx SMT. You can see this from the Elasticsearch error, where it is trying to use the original topic name in the index The practical step if you just want to force to lowercase is use the
But, it's probably worth raising a separate ticket to address the issue with RegexRouter that you're seeing anyway. |
@rmoff Thanks for confirming. I'll file a new issue then. Regarding Btw. I suppose there's a general shortcoming of either approach: it seems not possible to generically lower-case multiple topic names at once, as that's not supported by Java's regex engine AFAIK. That is, if the regex router isn't supporting some extended expression format. |
Logged #246. |
I'm having same problem with RegexRouter. Due to the way this connect creates indices at startup Line 157 in d332416
The best solution is to use RegexRouter on the source side to ensure the desired ES sink index names. The down side is that the source and sink are now more coupled. |
I am having same problem with TimestampRouter and my sink property is below Confluent Version 5.0.0 kafka 2.0 name=elasticsearch-sink #Transformations Exception: |
Hi Robin, Confluent version: 5.1.2 source config is able to parse the MySQL successfully(consumer can read)
However, the columnname is specified as timestamp & non null in DB. another table(diff connector) throws out an error as
where '---' was specified as the default value for non null column sink config:
Can you please point me in the right direction? |
above issue got resolved: |
closing because issue was resolved |
Following config works fine
But if I add
org.apache.kafka.connect.transforms.TimestampRouter
SMT:the Elasticsearch Sink fails:
Same problem exists with using
RegexRouter
e.g.:It looks like the Sink correctly autocreates indices based on the inbound topic, but if the topic mutates with SMT, it doesn't.
The text was updated successfully, but these errors were encountered: