Step 01. Create a Virtual Data
- Create dags foler below (venv) airflow-test folder.
1 | $ mkdir dags |
- Install the necessary libraries.
1 | $ pip3 install faker pandas |
- Create data folder and write python file in the folder to create a virtual data.
- filename : step01_writecsv.py
1 | $ mkdir data |
1 | ***# step01_writecsv.py*** |
- Run the file above and make sure that the data is well generated.
1 | $ python3 step01_writecsv.py |
Step 2. Establish csv2join file
- Write code to build CSV and JSON transform files in dags folder.
- filename : csv2join.py
1 | $ vi csv2json.py |
1 | ***# csv2join.py*** |
- Run the csv2json.py above.
1 | $ python3 csv2json.py |
Step 04. Run Webserver and Scheduler Simultaneously
- Open a separate terminal and run the webserver and scheduler.
1 | $ airflow webserver -p 8080 |
- Check if it works normally in the Web UI.