This repository contains a template for a data engineering project. It is intended to be used as a starting point for new projects. It contains a basic project structure of the python scripts.
The project structure is as follows:
.
├── de_scripts_template
│ ├── data
│ │ └── example.csv
│ ├── logs
│ │ └── example.log
│ ├── scripts
│ │ ├── __init__.py
│ │ ├── main.py
│ │ └── utils
│ │ ├── __init__.py
│ │ ├── credentials_utilities.py
│ │ ├── crud_utilities.py
│ │ ├── extraction_utilities.py
│ │ ├── file_utilities.py
│ │ ├── load_utilities.py
│ │ ├── log_utilities.py
│ │ ├── schemas.py
│ │ └── transform_utilities.py
│ ├── tests
│ ├── README.md
│ └── requirements.txt
- The
datafolder is intended to contain the data that is used in the project. - The
logsfolder is intended to contain the log files that are generated by the scripts. - The
scriptsfolder is intended to contain the python scripts. - The
testsfolder is intended to contain the tests for the scripts. - The
README.mdfile is intended to contain the description of the project. - The
requirements.txtfile is intended to contain the dependencies of the project.
Regarding the scripts folder.
- The
__init__.pyfile is intended to make the folder a python module. - The
main.pyfile is intended to be the main script of the project. - The
utilsfolder is intended to contain the utility scripts. - The
utils/__init__.pyfile is intended to make the folder a python module. - The
utils/credentials_utilities.pyfile is intended to contain the functions that are used to get the credentials. - The
utils/crud_utilities.pyfile is intended to contain the functions that are used to perform CRUD operations in databases. - The
utils/extraction_utilities.pyfile is intended to contain the functions that are used to extract data. - The
utils/file_utilities.pyfile is intended to contain the functions that are used to handle files. - The
utils/load_utilities.pyfile is intended to contain the functions that are used to load data. - The
utils/log_utilities.pyfile is intended to contain the functions that are used to handle logs. - The
utils/schemas.pyfile is intended to contain the schemas of the data and some operations to force the type of the data. - The
utils/transform_utilities.pyfile is intended to contain the functions that are used to transform data.
- Star this repository. ⭐
- Clone the repository.
- Rename the folder
de_scripts_templateto the name of the project. - Fill the files in the
datafolder with the data that is needed for the project. - Fill the files in the
scripts/utilsfolder with the functions that are needed for the project. - Fill the file
scripts/main.pywith the code that is needed for the project. - Fill the file
README.mdwith the description of the project. - Fill the file
requirements.txtwith the dependencies of the project. - Run the script
scripts/main.pyto test the project.
- Add a
Makefileto automate the execution of the scripts. - Add a
Dockerfileto containerize the project. - Add tests for the scripts.
- Create a CI/CD pipeline for the project.
Check out my other projects on GitHub