CHT Pipeline is a set of SQL queries that transform raw CouchDB data into a more useful format. It uses dbt
to define the models that are translated into PostgreSQL tables or views, which makes it easier to query the data in the analytics platform of choice.
Follow the instructions in the Local CHT Sync Setup documentation to set up CHT Sync with CHT Pipeline locally.
Docker
- (Optional)
PostgreSQL Client
- Navigate to
tests
folder. - Run the
setup
script:
# Set environment variables, create postgres database, schema and user:
./setup.sh
- Run the
dbt
tests:
# set environment variables, install dbt dependencies, seed data, run dbt, run test
./run_dbt_tests.sh
- Check for test coverage:
# Run dbt run-operation required_tests command
./check_tests_coverage.sh
- Clean up:
./tear_down.sh