https://github.com/fccn/nau-database-exporter
Exports data from Open edX MySQL Database into an Excel Spreedsheet or Google Sheet
https://github.com/fccn/nau-database-exporter
docker-container openedx python
Last synced: 4 months ago
JSON representation
Exports data from Open edX MySQL Database into an Excel Spreedsheet or Google Sheet
- Host: GitHub
- URL: https://github.com/fccn/nau-database-exporter
- Owner: fccn
- License: gpl-3.0
- Created: 2021-04-27T21:42:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T16:06:24.000Z (over 1 year ago)
- Last Synced: 2024-10-19T23:39:05.260Z (over 1 year ago)
- Topics: docker-container, openedx, python
- Language: Python
- Homepage:
- Size: 110 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DatabaseExporter
Exports Open edX data from MySQL database into a spreadsheet.
It is possible to export the sheets to a single multi sheet xlsx file or alternatively
update a Google Sheet file. On the NAU project it is used the second option.
The NAU dashboard, based on Google Data Studio, use that Google Sheet has one of
its data source.
The mysql database user needs a read grant for the `edxapp` database.
Those scripts should be run at least once a day, preference after the midnight, so your
Google Sheet file always contains the yesterday's data in full.
The queries don't have any reference to individual users, and don't have specific
identification numbers, like user id, emails or similar data; so it's GDPR compliant.
# Usage
- Setup a Virtual Environment
- Set the `config.ini` file based on the `config.init.sample`.
- Execute `report_xlsx.py` or `report_google.py`.
### Activate virtual environment and install its dependencies
Use python `3.11`.
```bash
virtualenv venv --python=python3
source venv/bin/activate
pip install -r requirements.txt --upgrade
```
### Set the "config.ini" file based on the "config.init.sample".
```bash
cp config.init.sample config.ini
vim config.ini
```
### Export data to a xlsx file
```bash
python export.py --config config.ini --export xlsx
```
### Export data to a Google Sheet
```bash
python export.py --config config.ini --export google_sheets
```