Giter Site home page Giter Site logo

kotlin-spring-batch-etl's Introduction

HTTP triggered Spring Batch ETL Job using Tasklet

Overview

The main purpose of this application is to perform data migration and aggregation from a source database to a target database using Spring Batch. It follows the ETL pattern, where data is extracted from the source database, transformed, and loaded into the target database. The application provides an easy-to-use RESTful API to trigger the ETL job.

Requirements

  • x86-64
  • JDK 17
  • Docker

Startup

The script "up" starts the application by executing the following:

1. docker-compose -f db/source/docker-compose.yml up -d
2. docker-compose -f db/target/docker-compose.yml up -d
3. mvn clean install
4. mvn spring-boot:run

Usage

The application exposes an HTTP endpoint for triggering the ETL job. You can use any REST client, like Postman, to make a POST request to the /batch/start endpoint with the target date as a parameter.

Endpoint details

Endpoint: POST /batch/start

Parameters:

targetDate: The date for which the ETL job should be executed. It should be in the format 'yyyy-MM-dd'.

Response: The endpoint will respond with a 200 status code if the job succeeded and a 400 status code if the job failed.

Shutdown

The script "down" wipes the source and target databases executing the following:

1. docker-compose -f db/source/docker-compose.yml down
2. docker-compose -f db/target/docker-compose.yml down

Postman Collection

The repository includes a Postman collection in the 'postman' directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.