Database Documentation (dbdocs)¶
This project uses dbdocs.io to host the schema documentation for the performance_db database. It provides an interactive interface to visualize tables, relationships, and column types.
🔗 Access the Documentation¶
The documentation is deployed privately. You can access it using the credentials below:
- URL: dbdocs.io/performance-echoenergia/echoenergia-performance
- Password:
p3rf0rM#nce
Note: The
dbdocsproject is linked to the team accountperformance@echoenergia.com.br.
⚙️ Automation Pipeline¶
The documentation is automatically updated daily via an Airflow DAG.
Architecture¶
The update process follows this flow:
- Airflow DAG (
pg-update-dbdocs) triggers a task. - SSH Operator connects to the
echo-performanceserver (100.64.141.14). - Bash Script (
update_dbdocs.sh) is executed on the server. - dbdocs CLI connects to Postgres, generates the DBML file, and uploads it to the cloud.
Source Files¶
- Airflow DAG:
dags/pg-update-dbdocs.py - Server Script:
/home/performance/performance_project/dbdocs/update_dbdocs.sh
🛠 Manual Update¶
If you make schema changes and need to update the documentation immediately (without waiting for the daily schedule), you can trigger the update manually from the server.
-
SSH into the server:
ssh performance@100.64.141.14 -
Run the update script:
bash /home/performance/performance_project/dbdocs/update_dbdocs.sh
You should see the message: Documentation updated successfully!