snowflakedb / snowflake-kafka-connector

Snowflake Kafka Connector (Sink Connector)
Apache License 2.0
138 stars 97 forks source link

Fail / Warn on a topic configured in topic2table.map not present in topics or topics.regex #871

Open Dionakra opened 4 months ago

Dionakra commented 4 months ago

Hi Snowflake Team,

I propose a small change in the validation of the snowflake.topic2table.map property regarding the topics being configured.

We have faced more than once a failed copy/paste between the topics and the snowflake.topic2table.map properties, messing up with casing or some simple miss-typing, generating silent errors in the sinks, as the topics would still be ingested in Snowflake, but not in the desired table, causing some headaches.

So, the change I propose is the following: In the Utils.parseTopicToTable method, validate that, each topic present in the map, matches with, at least, one of the defined topics / regexes, and if a topic is not present, throw a new error informing about the mismatch between the topics being configured as source, and the mappings available, so the developer:

sfc-gh-gjachimko commented 3 months ago

thank you for your suggestion. we will add internal ticket to track that.

sfc-gh-gjachimko commented 3 months ago

@Dionakra we've added this to our backlog for Q3. I'll close this issue when we get that delivered.