Not able to convert Snowplow enriched events into a JSON format

We are actually trying to consume Snowplow enriched events and
convert them into a JSON format. To achieve this, we are using snowplow-scala-analytics-sdk

We are facing following issues while using the sdk :

  1. We are using Scala 10 and this sdk supports Scala 11. Do we have scala 10 supporting sdk available ?

  2. We moved our system from scala 10 to Scala 11 to consume the sdk for now, and facing a scalaz issue. Please find attached screenshot for details.

  3. Do we have this sdk dependency available on maven, as we are not using sbt ?

PS. Also attaching the code for your reference.

Please let us know the steps to be followed to consume this sdk or any other workaround available to achieve our task.

Hi @Garima,

Not currently, good idea though: Add support for Scala 2.10.5 · Issue #14 · snowplow/snowplow-scala-analytics-sdk · GitHub

Of course, SBT is just a build tool - you can use any JVM build tool to include the dependency in your project. It’s currently hosted in our Snowplow Maven repo; we will be moving it to Maven Central at some point.

A NoSuchMethodError normally means that you have a missing dependency at runtime. You should create a fatjar of your app to pull in the Scala Analytics SDK’s own dependencies.

Hey Alex,

Thanks for the quick support!!
I need some more help here …

  • Do we have this sdk dependency available on maven, as we are not using sbt ?

– Of course, SBT is just a build tool - you can use any JVM build tool
to include the dependency in your project. It’s currently hosted in our Snowplow Maven repo; we will be moving it to Maven Central at some point.

–> Link for Snowplow Maven Repo where there sdk is hosted ??

HI @Garima,

Apologies for the confusion - actually the Scala Analytics SDK is already published for Scala 2.10.

It’s the first URL you see in this section: GitHub - snowplow/snowplow-scala-analytics-sdk: Scala SDK for working with Snowplow enriched events in Spark, AWS Lambda, Flink et al.

If you’re using maven or gradle then the dependency is 'com.snowplowanalytics:snowplow-scala-analytics-sdk_2.11:0.1.1'

Change the scala version to suit your needs.

Hey,

I have created FatJar and tried to ingest the sdk but still getting the same error.

Please refer attachment for details.

I am not sure what I am doing wrong here… :frowning:

Maybe it can be of some help. Here is my working example of Flink code translating enriched events to JSON format. It is reading events from one Kafka topic and writing to another one. https://github.com/rbox24/snowplow-flink-enriched2json