justadreamer / DE-07-homework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DE-07-homework

lesson_02

Running the jobs

Stay in the root folder of this repository. Specify it as PYTHONPATH env variable so that the package lesson_02 can be found.
Run jobs in separate terminals:

PYTHONPATH=. API_AUTH_TOKEN=<auth token> python lesson_02/job1/main.py 
PYTHONPATH=. python lesson_02/job2/main.py 

Checking the jobs

After the jobs are running to check them run in yet another terminal:

BASE_DIR=/tmp/sales python lesson_02/bin/check_jobs.py 
ls -l /tmp/sales/raw/sales/2022-08-09/
ls -l /tmp/sales/stg/sales/2022-08-09/

Tests

cd lesson_02/job1/tests
PYTHONPATH=../../../ python -m unittest
cd - 
cd lesson_02/job2/tests
PYTHONPATH=../../../ python -m unittest
cd -

About


Languages

Language:Python 64.0%Language:Jupyter Notebook 36.0%