Skip to content

PedroBittarBarao/Project_ETL

Repository files navigation

Project_ETL

This OCaml project processes and filters order data from CSV files to generate a summarized report based on configurable criteria.

Functionality

  • Data Parsing: Reads and processes CSV files containing Order and OrderItem data.

  • Filtering: Supports filtering orders by status (pending, complete, cancelled) and origin (P for physical, O for online).

  • Aggregation: Computes:

    • total_amount: The total revenue of an order (sum of price * quantity for all items).

    • total_taxes: The total tax amount ((price * quantity) * tax for all items).

  • CSV Output: Generates a summary file (out.csv) with order_id, total_amount, and total_taxes.

  • This tool provides efficient and structured data processing for order tracking and financial reporting.

Diagrams

Input tables

image

Output table

image

Usage:

1. Release

  • Download latest executable release
  • Usage: ./project_etl_linux <orders_csv> <items_csv> <output_csv>

2. Build

  • Install opam and dune
  • cd inside project folder
  • dune build
  • Usage: dune exec project_etl <orders_csv> <items_csv> <output_csv>
  • Executable can be found in _build/install/default/bin/
  • Example options can be found and run with run_etl.sh

Options:

  • status (Case sensitive): Pending|Complete|Canceled
  • origin (Case sensitive): P|O

Disclaimer

Generative AI tools were used to aid in the creation of code and documentation of this project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published