https://github.com/codeforafrica/htools-avg_data_psql_queries
A collection of PSQL queries to get average sensor data for given time periods
https://github.com/codeforafrica/htools-avg_data_psql_queries
Last synced: 3 months ago
JSON representation
A collection of PSQL queries to get average sensor data for given time periods
- Host: GitHub
- URL: https://github.com/codeforafrica/htools-avg_data_psql_queries
- Owner: CodeForAfrica
- Created: 2022-09-02T13:38:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-12T13:37:02.000Z (4 months ago)
- Last Synced: 2026-01-12T19:40:45.656Z (4 months ago)
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## A collection of PSQL scripts to query sensors.AFRICA's database
### Requirements
1. A URL connection string/parameters to access PostgreSQL htools database; Request from sensors' tech admins
2. `JDBC Driver` or postgres client in instances where the scripts are run locally.
### Tips
1. Tools to use: [DBeaver](https://dbeaver.io) ( comments are formated properly when using editors like DBeaver SQL editor and Visual Studio Code )
2. PostgreSQL clients:
1. [node-postgres](https://node-postgres.com)
2. [psycopg](https://www.psycopg.org)
### Troubleshooting
Working with PostgreSQL on a MAC can be problematic especially when trying to restore backup data. To resolve some of these issues, you could:
1. Open Terminal and run the command below.
```sh
sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
```
2. Download and install PostgreSQL which sets a lot of configurations for you.