Coder Social home page Coder Social logo

ns's Introduction

Spark Batch Processor Application

This application processes data from a RAW zone to a Processed zone using Spark, while addressing potential issues with small files.

Description

  • The application reads data from specific partitions in the RAW zone, corresponding to today's date.
  • It performs schema validation, type validation, and formatting.
  • To avoid the small files problem, the application coalesces the data into a reasonable number of files before writing to the destination.
  • The processed data is then written to the Processed zone, partitioned by date.

Pre-requisites

  • Apache Spark
  • Python 3.x
  • pyhocon (for configuration parsing)
  • Logging module (for logging operations)

Configuration

The application requires a configuration file (application.conf) with the following parameters:

  • s3.raw-zone-path: The path to the RAW zone where the data is read from.
  • s3.processed-zone-path: The path to the Processed zone where the data will be written to.
  • data.xml_schema: The schema for XML validation.

Ensure these configurations are correctly set before running the application.

Usage

To run the Batch Processor Application: python BatchProcessorApp.py

Logging

The application logs its operations, which can be helpful for troubleshooting and monitoring. The logs are saved to logs/batch_processor_app.log.

Note

Adjust the number of partitions in the coalesce method based on the typical size of your data and your specific requirements to efficiently handle the small files problem.

Contributors

Ihor Haivan

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

ns's People

Contributors

igor-gayvan avatar

Watchers

 avatar

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.