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

Fixed #16 Added option to configure mapping of fields in SinkRecord to CQL columns #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaruna
Copy link
Contributor

@aaruna aaruna commented Apr 13, 2016

Fixes #16

)
case _ => Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.1.0",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this for JSON parsing. It comes with scala-core for 2.10.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about when using scala 2.11, the norm? and 2.12 coming?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it comes with 2.10 or less, I added this dependency only for scala versions >= 11.

@helena
Copy link
Collaborator

helena commented Apr 14, 2016

@aaruna I want to wait on this because my PR coming is a huge change. It will be easier to integrate this after, thanks.

@aaruna aaruna changed the title [WIP] Fixed #16 Added option to configure mapping of fields in SinkRecord to CQL columns Fixed #16 Added option to configure mapping of fields in SinkRecord to CQL columns May 3, 2016
@@ -123,6 +125,9 @@ object TaskConfig {
final val SinkConsistency: Key = "cassandra.sink.consistency"
final val DefaultSinkConsistency = ConsistencyLevel.LOCAL_QUORUM

final val FieldMapping: Key = "cassandra.sink.field.mapping"
final val DefaultFieldMapping = Map.empty[String, Any]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this could be anything other than Map[String,String] from the overarching config in the api so

     final val DefaultFieldMapping = Map.empty[String, String]

@aaruna
Copy link
Contributor Author

aaruna commented May 4, 2016

@helena I have updated the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants