Develop a job to find carts abandoned by e-commerce customers. Although the subject is rich, in the test the definition of cart abandonment will be simplified.
OS: Ubuntu
OS Version: 20.04.1 LTS x64
Python Version: 3.8.5
Apache Beam Version: 2.25.0
To run you will need git pkg and virtualenv python library
- Installing git via apt:
$ sudo apt-get install git
- Installing Python virtualenv lib:
$ pip3 install virtualenv
Open your terminal and follow the steps:
- Clone the repository:
$ git clone https://github.com/JnsFerreira/b2w_challange.git
- Change to repo directory:
$ cd b2w_challange
- Activate the virtual enviroment:
$ source b2w_challange_env/bin/activate
If you want to use default input and output directories:
python3 abandoned_carts.py
Otherwise, to specify input and output directories:
python3 abandoned_carts.py --input [path_to_input] --ouput [path_to_output]
To see the output file content, type on your terminal:
$ cat -n output/abandoned_carts-00000-of-00001.json