Skip to content

pehaikal/Data-Structuration-and-Transportation

Repository files navigation

Data Structuration and Transportation

Context

You oversee developing a batch to send emails automatically for a company marketing campaigns. The marketing campaigns are targeting inhabitants of specific cities, but unfortunately the marketing tool used is not able to send emails automatically nor to observe tracking of the emails sent. On another hand, you have already a bot that does this, but needs specific data structuration to achieve that.

Global Project Schema:

Data Structuration and Transportation

Batch Implementation Model:

Batch Implementation

Tasks

This project is split in several tasks, to facilitate your evaluation.

  1. Choose a framework among:

    • Camel (Java)
    • Bonobo (Python)
  2. Load the contacts.sql in the database (postgres is preferred or h2 for java users).

  3. Prepare a pipeline that will:

    • Read the contacts items from the database

    • For each contact selected (thanks to the campaign meta), create an email body (html format) from the provided email template, each wildcard should be replaced by the appropriate contact info.

    • Example:

      • In the resulting file: A special offer for you in your city of ${city}

      • Will become: A special offer for you in your city of New York

  • N.B: If the current contact city field is "New York" then:
    • Put the resulting email file in the output folder "email-spool" (can be anywhere on your file system).
    • Prepare a daily html report of the email sent to what contact.
    • Make everything configurable (no hardcoded conf entries).
    • Make everything trackable (have the state of the contact processing; Is it "selected for campaign", "email ready", "email sent" ?) so, your pipeline will be able to not take the same contacts twice, even after a forceful stop.