Skip to content
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

DataConverter should be configurable so as to allow conversion of any type of ValueSchema to CQL query #16

Open
aaruna opened this issue Apr 11, 2016 · 4 comments

Comments

@aaruna
Copy link
Contributor

aaruna commented Apr 11, 2016

Right now, DataConverter.sinkRecordToQuery(r, configProperties) assumes one-to-one mapping between fields in ValuesSchema of SinkRecord to the columns in the CQL table.

I saw this need when I am trying to use kafka-connect-twitter which uses a particular schema and the Sink table might have a different schema.

@helena Is this a valid use-case?

@helena
Copy link
Collaborator

helena commented Apr 12, 2016

Hi @aaruna, the PR I'm working on in another branch which I believe resolves this actually.
My code changes create the table schema on start up from Cassandra and parse based on that, not on the fields from Kafka. Great question and insight :) I will add you to my PR so you can check that too.

@Shiti
Copy link
Contributor

Shiti commented Apr 13, 2016

@helena I discussed this with @aaruna yesterday, we agreed that having an optional map object with the component name as key and corresponding cassandra column name as value would be useful.

@aaruna
Copy link
Contributor Author

aaruna commented Apr 13, 2016

@helena I have started working on that (taking the approach @Shiti mentioned in the previous comment) as I need it to use kafka-connect-twitter as source.
Is there any branch I can look at to see if your approach solves this problem?

aaruna added a commit to aaruna/kafka-connect-cassandra that referenced this issue Apr 13, 2016
@aaruna
Copy link
Contributor Author

aaruna commented Apr 13, 2016

I have raised a PR #18 fixing this issue.
It is a WIP. I still need to add few more tests and fix a scalastyle issue.

aaruna added a commit to aaruna/kafka-connect-cassandra that referenced this issue May 3, 2016
@helena helena modified the milestone: experimental-release May 3, 2016
aaruna added a commit to aaruna/kafka-connect-cassandra that referenced this issue May 4, 2016
aaruna added a commit to aaruna/kafka-connect-cassandra that referenced this issue May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants