Back to directory
hablapps avatar

doric

Type safety for spark columns. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/hablapps/doric.git

79

Stars

9

Forks

6

Watchers

Apache-2.0

License

doric

Type-safe columns for spark DataFrames!

GitHub release (latest by date) GitHub Release Date

CI pages-build-deployment Release Scala Steward badge Binder

Spark Maven Central Codecov
2.4.x Deprecated Maven Central Codecov
3.0.x Maven Central Codecov
3.1.x Maven Central Codecov
3.2.x Maven Central Codecov
3.3.x Maven Central Codecov
3.4.x Maven Central Codecov
3.5.x Maven Central Codecov

Doric offers type-safety in DataFrame column expressions at a minimum cost, without compromising performance. In particular, doric allows you to:

  • Get rid of malformed column expressions at compile time
  • Avoid implicit type castings
  • Run DataFrames only when it is safe to do so
  • Get all errors at once
  • Modularize your business logic

You'll get all these goodies:

  • Without resorting to Datasets and sacrificing performance, i.e. sticking to DataFrames
  • With minimal learning curve: almost no change in your code with respect to conventional column expressions
  • Without fully committing to a strong static typing discipline throughout all your code

User guide

Please, check out this notebook for examples of use and rationale (also available through the binder link).

You can also check our documentation page

Installation

Fetch the JAR from Maven:

Sbt

libraryDependencies += "org.hablapps" %% "doric_3-2" % "0.0.8"

Maven

<dependency>
    <groupId>org.hablapps</groupId>
    <artifactId>doric_3-2_2.12</artifactId>
    <version>0.0.8</version>
</dependency>

Doric depends on Spark internals, and it's been tested against the following spark versions.

Spark Scala Tested doric
2.4.x (Deprecated) 2.11 ✅ Maven Central
3.0.0 2.12 ✅ You can use 3.0.2 version
3.0.1 2.12 ✅ You can use 3.0.2 version
3.0.2 2.12 ✅ Maven Central
3.1.0 2.12 ✅ You can use 3.1.2 version
3.1.1 2.12 ✅ You can use 3.1.2 version
3.1.2 2.12 ✅ Maven Central
3.2.0 2.12 / 2.13 ✅ You can use 3.2.4 version
3.2.1 2.12 / 2.13 ✅ You can use 3.2.4 version
3.2.2 2.12 / 2.13 ✅ You can use 3.2.4 version
3.2.3 2.12 / 2.13 ✅ You can use 3.2.4 version
3.2.4 2.12 ✅ Maven Central
3.2.4 2.13 ✅ Maven Central
3.3.0 2.12 / 2.13 ✅ You can use 3.3.4 version
3.3.1 2.12 / 2.13 ✅ You can use 3.3.4 version
3.3.2 2.12 / 2.13 ✅ You can use 3.3.4 version
3.3.3 2.12 / 2.13 ✅ You can use 3.3.4 version
3.3.4 2.12 ✅ Maven Central
3.3.4 2.13 ✅ Maven Central
3.4.0 2.12 / 2.13 ✅ You can use 3.4.4 version
3.4.1 2.12 / 2.13 ✅ You can use 3.4.4 version
3.4.2 2.12 / 2.13 ✅ You can use 3.4.4 version
3.4.3 2.12 / 2.13 ✅ You can use 3.4.4 version
3.4.4 2.12 ✅ Maven Central
3.4.4 2.13 ✅ Maven Central
3.5.0 2.12 / 2.13 ✅ You can use 3.5.5 version
3.5.1 2.12 / 2.13 ✅ You can use 3.5.5 version
3.5.2 2.12 / 2.13 ✅ You can use 3.5.5 version
3.5.3 2.12 / 2.13 ✅ You can use 3.5.5 version
3.5.4 2.12 / 2.13 ✅ You can use 3.5.5 version
3.5.5 2.12 ✅ Maven Central
3.5.5 2.13 ✅ Maven Central

Contributing

Doric is intended to offer a type-safe version of the whole Spark Column API. Please, check the list of open issues and help us to achieve that goal!

Please read the contribution guide 📋

Releases

Oct 29, 2024

0.0.8

Download .zip

What's Changed

Documentation update to show new version by @alfonsorr in #356 ISSUE-363: Add the ability to Drop columns with DoricColumns by @Amalicia in #366 Updated spark 2.3.x and spark 2.4.x ver...

May 16, 2023

0.0.7

Download .zip

Highlights Spark 3.4 compatibility and testing against 3.3.2 and 3.2.3, new functions (array sorting functions, string comparators, collection functions, and more) What's Changed New things and bugfix...

Highlights

This release contains more methods for Doric, including unary functions, array_sort, and changes in handling struct types that don't interfere with the doric syntax. We are also testing ag...

Jul 21, 2022

Download .zip

Highlights in 0.0.5 First of all, we had our first external committer, thanks @Amalicia for your work. Doric 0.0.5 comes with a lot of new staff:

Support for Product types if you want a struct schema...

May 27, 2022

Download .zip

What's Changed Highlights

Doric for spark 2.4!!!!! by @alfonsorr in #207 Dynamic invocations for Row columns and top row by @jserranohidalgo in #211

Dependency updates

ScalaSteward: Update scalafmt...