https://github.com/mtoensing/dwh-proxy
python script to feed data to my miniature data warehouse
https://github.com/mtoensing/dwh-proxy
data-warehouse docker minecraft-server mysql python3
Last synced: about 1 month ago
JSON representation
python script to feed data to my miniature data warehouse
- Host: GitHub
- URL: https://github.com/mtoensing/dwh-proxy
- Owner: mtoensing
- Created: 2019-08-05T19:37:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T13:29:31.000Z (over 5 years ago)
- Last Synced: 2025-01-01T18:12:45.570Z (over 1 year ago)
- Topics: data-warehouse, docker, minecraft-server, mysql, python3
- Language: Python
- Homepage: https://marc.tv/data-warehouse-grafana-synology/
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history.sql
Awesome Lists containing this project
README
# dwh-proxy
DataWareHouse Proxy for Grafana and MySQL
## MySQL structure
See `history.sql`.
## mysql-config.json
```json
{
"mysql":{
"server":"ADR",
"user":"USER",
"password":"SECRET!!",
"db":"DB"
}
}
```
## weather-apikey.json
Get apikey from http://api.openweathermap.org
```json
{
"weather":{
"apikey":"key"
}
}
```
## youtube-apikey.json
```json
{
"youtube":{
"apikey":"key",
"channelid":"UCar1gwRwYqAGSNAuZoKDh2w"
}
}
```
## On Synology
Install the official Python3 package first. To install PyMySQL on Synology DSM do the following:
```
sudo su
curl -k https://bootstrap.pypa.io/get-pip.py | python3
/volume1/@appstore/py3k/usr/local/bin/pip3 install PyMySQL
```
## Purge old entries from the database
DELETE FROM history WHERE TIMESTAMP < (NOW() - INTERVAL 6 MONTH)