diff --git a/.circleci/config.yml b/.circleci/config.yml index 11081523..4dc218b6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: workflows: version: 2 - trying-stage: + build-and-release: jobs: - build - release: diff --git a/README.md b/README.md index ffbc13e9..22ef95ff 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Based on official Parquet library, Hadoop Client and Shapeless. Add the library to your dependencies: ``` -"com.github.mjakubowski84" %% "parquet4s" % "0.1.0" +"com.github.mjakubowski84" %% "parquet4s-core" % "0.2.0" ``` @@ -73,3 +73,32 @@ parquetIterable.foreach(println) parquetIterable.close() ``` + +# How to use Parquet4S with Akka Streams? + +Parquet4S has a simple integration module that allows you to read Parquet file using Akka Streams! +Just import it: + +``` +"com.github.mjakubowski84" %% "parquet4s-akka" % "0.2.0" + +``` + +And now you can define Akka Streams source that reads Parquet files: + +```scala +import com.github.mjakubowski84.parquet4s.ParquetStreams +import com.github.mjakubowski84.parquet4s.ParquetRecordDecoder._ +import akka.actor.ActorSystem +import akka.stream.{ActorMaterializer, Materializer} + +case class User(userId: String, name: String, created: java.sql.Timestamp) + +implicit val system: AcrtorSystem = ActorSystem() +implicit val materializer: Materializer = ActorMaterializer() + +ParquetStreams.fromParquet[User]("file:///data/users").runForeach(println) + +system.terminate() + +``` diff --git a/build.sbt b/build.sbt index 2741d13e..bc310b28 100644 --- a/build.sbt +++ b/build.sbt @@ -5,8 +5,8 @@ lazy val resolvers = Seq( lazy val commonSettings = Seq( Keys.organization := "com.github.mjakubowski84", - Keys.version := "0.2.0-SNAPSHOT", - Keys.isSnapshot := true, + Keys.version := "0.2.0", + Keys.isSnapshot := false, Keys.scalaVersion := "2.11.12", Keys.crossScalaVersions := Seq("2.11.12", "2.12.8"), Keys.scalacOptions ++= Seq("-deprecation", "-target:jvm-1.8"),