|
|
|
|
# Actes princiers -- data transformations
|
|
|
|
|
|
|
|
|
|
1. kedro run --tags="etl_transform"
|
|
|
|
|
2. run --tags="populate_database"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Project Name
|
|
|
|
|
|
|
|
|
|
human readable name : `Actes Princiers`
|
|
|
|
|
|
|
|
|
|
The project name 'Actes Princiers' has been applied to:
|
|
|
|
|
|
|
|
|
|
- The project title in `datascience/actes-princiers/README.md`
|
|
|
|
|
- The folder created for your project in `datascience/actes-princiers`
|
|
|
|
|
- The project's python package in `datascience/actes-princiers/src/actes_princiers`
|
|
|
|
|
|
|
|
|
|
A best-practice setup includes initialising git and creating a virtual environment before running 'pip install -r src/requirements.txt'
|
|
|
|
|
|
|
|
|
|
## Getting started
|
|
|
|
|
|
|
|
|
|
- Install a virtual environment : `python -m venv .venv`
|
|
|
|
|
- Enable the virtual environment : `source .venv/bin/activate`
|
|
|
|
|
- install kedro `pip install kedro`
|
|
|
|
|
- Install the packages and libraries `pip install -r src/requirements.txt`
|
|
|
|
|
|
|
|
|
|
**go to `actes-princiers`'s folder**
|
|
|
|
|
|
|
|
|
|
Then open a terminal in the `actes-princiers`'s folder
|
|
|
|
|
and launch jupyter : `kedro jupyter notebook`
|
|
|
|
|
or start the ipython prompt : `kedro ipython`
|
|
|
|
|
|
|
|
|
|
## Launching the pipelines
|
|
|
|
|
|
|
|
|
|
Open a terminal in the `actes-princiers`'s folder and launch kedro
|
|
|
|
|
|
|
|
|
|
`kedro run`
|
|
|
|
|
|
|
|
|
|
or launch a specific node in the pipeline with:
|
|
|
|
|
|
|
|
|
|
`kedro run --nodes=<node_name>`
|
|
|
|
|
|
|
|
|
|
or a search by tags with:
|
|
|
|
|
|
|
|
|
|
`kedro run --tags=<tag_name>`
|
|
|
|
|
|
|
|
|
|
## Visualizing the pipelines
|
|
|
|
|
|
|
|
|
|
install kedro viz with
|
|
|
|
|
|
|
|
|
|
`pip install kedro-viz`
|
|
|
|
|
|
|
|
|
|
Then launch the command
|
|
|
|
|
|
|
|
|
|
`kedro viz`
|
|
|
|
|
|
|
|
|
|
## tips
|
|
|
|
|
|
|
|
|
|
You need to reload Kedro variables by calling `%reload_kedro` in your notebook and re-run the code snippet
|
|
|
|
|
|
|
|
|
|
|