DataMover

Out of the box scheduling, logging, monitoring and data governance.

License

License

Categories

Categories

Data
GroupId

GroupId

de.jannikarndt
ArtifactId

ArtifactId

datamover
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

DataMover
Out of the box scheduling, logging, monitoring and data governance.
Project URL

Project URL

https://github.com/JannikArndt/DataMover
Source Code Management

Source Code Management

http://github.com/JannikArndt/DataMover/tree/master

Download datamover

How to add to project

<!-- https://jarcasting.com/artifacts/de.jannikarndt/datamover/ -->
<dependency>
    <groupId>de.jannikarndt</groupId>
    <artifactId>datamover</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.jannikarndt/datamover/
implementation 'de.jannikarndt:datamover:1.1.0'
// https://jarcasting.com/artifacts/de.jannikarndt/datamover/
implementation ("de.jannikarndt:datamover:1.1.0")
'de.jannikarndt:datamover:jar:1.1.0'
<dependency org="de.jannikarndt" name="datamover" rev="1.1.0">
  <artifact name="datamover" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.jannikarndt', module='datamover', version='1.1.0')
)
libraryDependencies += "de.jannikarndt" % "datamover" % "1.1.0"
[de.jannikarndt/datamover "1.1.0"]

Dependencies

compile (8)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.3
org.scala-lang : scala-compiler jar 2.12.3
org.quartz-scheduler : quartz jar 2.3.0
org.eclipse.jetty : jetty-server jar 9.4.6.v20170531
org.eclipse.jetty : jetty-servlet jar 9.4.6.v20170531
com.typesafe.scala-logging : scala-logging_2.12 jar 3.7.2
org.slf4j : slf4j-api jar 1.7.25
org.slf4j : slf4j-log4j12 jar 1.7.25

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.4

Project Modules

There are no modules declared in this project.

DataMover

Out of the box scheduling, logging, monitoring and data governance for your scala ETL jobs.

DataMover logo

Build Status

Getting DataMover

<dependency>
  <groupId>de.jannikarndt</groupId>
  <artifactId>datamover_2.12</artifactId>
  <version>1.2.0</version>
</dependency>

or

libraryDependencies += "de.jannikarndt" % "datamover" % "1.1.0"

Example:

import de.jannikarndt.datamover._
import de.jannikarndt.datamover.governance.GovernedID
import scala.concurrent.duration._
import scala.language.postfixOps

object ExampleJob {
    def main(args: Array[String]): Unit = DataMover run classOf[ExampleJob] every (10 seconds)
}

class ExampleJob extends DataMover("ExampleJob") {

    override def run(): Unit = {
        // here you can access
        // - logger => Log debug, info or error information
        // - monitor => track throughput
        // - governedId => append this to your output to find the job that generated it

        // Logging
        logger.info(s"Logs are aggregated per run. These are for Job ${governedId.identifier}.")

        // Write you own EXTRACT-function

        // Monitor your input
        monitor.input(5)
        
        // Write your own TRANSFORM-function

        // Write your own LOAD-function
        
        // Monitor your output
        monitor.output("Appended successfully")
    }
}

Then head to http://localhost:55555 (and increasing for every additional job):

Monitoring Screenshot

Monitoring with Prometheus

Prometheus can read directly from DataMover jobs. Just add the targets: ['localhost:55555'] to your prometheus.yml!

License

This code is open source software licensed under the MIT License.

To-Do / Planned

  • Data Governance

  • Alerting when job fails

  • Uptime-Monitoring for sources and sinks

  • Versioning: Which version of which job is deployed where? + Changelog

  • Feature toggles

  • Central server to monitor all jobs: Monitoring Idea

  • Interface for Elastic/Kibana

  • Interface for Jolokia

Deployment

Snapshots are deployed at oss.sonatype.org. Releases are deployed at maven.org.

Changes

v1.3.0

  • Support for Prometheus
  • Jobs automatically choose a free port, starting at 55555
  • LogLevel coloring
  • GovernedId can be accessed anywhere in class

v1.2.0

  • Logger now supports ERROR, WARN and DEBUG
  • Governor writes valid json
  • artifact id contains scala version

v1.1.0

  • Upgrade to scala 2.12.3
  • Removed unnecessary dependencies
  • Removed old files

Versions

Version
1.1.0
1.0.0