-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for topics with multiple schemas #114
Comments
The connector doesn't support this natively, but it's possible to implement by the use of SMTs that redirect records to topics based on their schemas (or on some other predicate that has a directly correlation with their schema). Just note that the use of SMTs that change the topic/partition/offset information of a record cannot be used in combination with the |
Hi @C0urante 👋 |
Sure, there's one in the quickstart config: kafka-connect-bigquery/kcbq-connector/quickstart/properties/connector.properties Lines 31 to 38 in ebcf919
|
Thanks @C0urante, I'm already using this conf in order to route data to the table with the name I want but I can't see how I could use these confs in order to redirect records from one topic to multiple BQ tables depending on their schema. |
I'm providing a little more context on my usecase, basically I'm using |
Schemas are stored into the Confluent Schema Registry |
Ah sorry, I thought you wanted a general demonstration of how to configure an SMT. For your specific use case I don't know if there is an already-implemented SMT available, but it shouldn't be too hard to implement one that redirects records to different topics based on, e.g., the name of the record's schema. You can see some examples of how to implement an SMT in the Kafka Connect codebase here, including the RegexRouter and ExtractField SMTs. |
Thanks for the lead. |
I just found this one that is promising.
Also I can't find the SMT mentioned above within the list of supported SMTs https://docs.confluent.io/cloud/current/connectors/single-message-transforms.html#list-of-available-smts |
Doesn't the Confluent Avro converter automatically populate the schema name based on the name of the Avro record it was derived from?
Ah yeah! That's exactly what I was thinking of. You can probably combine this with the
I'm sorry, those docs are incorrect and I've reached out to the team that owns them to see about publishing a correction. The connector works fine with SMTs that modify topic/partition/offset, unless you are running with upsert/delete turned on (i.e., |
Thanks for your answer !
Good idea I didn't think about that, thanks! |
This functionality has been developed in wepay#238, but looks like its abandoned since then.
Is it possible to integrate this solution into connector?
The text was updated successfully, but these errors were encountered: