Grafana postgresql support#8870
Open
fabioluciano wants to merge 11 commits into
Open
Conversation
- Disable ambiguous alias pattern that caused _computed suffix duplication - Add MySQL FIELD() function to PostgreSQL CASE WHEN conversion - Fix adoption_pct and deploy_count column name issues
Remove outdated dashboard files from _archive directory
Standardize dashboard filenames from CamelCase to kebab-case for consistency
- Fix _computed suffix duplication in column aliases - Convert MySQL FIELD() to PostgreSQL CASE WHEN - Apply all SQL dialect fixes from updated conversion script - Rename dashboard files to kebab-case for consistency
- Rename docker-compose-dev.yml to docker-compose-dev-postgresql.yml - Create separate docker-compose-dev-mysql.yml - Use different project names to avoid conflicts - Assign unique ports for each stack (MySQL: 3001/8083/4001/4181, PostgreSQL: 3002/8084/4000/4180)
Create dedicated compose file for MySQL development environment with unique ports and project name
Set foldersFromFilesStructure to false to prevent creating postgresql/mysql subdirectories in Grafana UI
Merge plugin installation and permission setup into single RUN statement
Contributor
Author
|
This PR seens big, but isnt. The number of lines is big bcs of the grafana dashboard that i converted to postgresql using the python script. I tested evry single query :) |
Contributor
|
Great job! I believe this is a significant improvement to the project. |
Contributor
|
Could you please fix the failed check? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive PostgreSQL support for Grafana dashboards, enabling DevLake to work with PostgreSQL databases in addition to MySQL.
Key Changes:
PostgreSQL Dashboard Support
convert-mysql-to-postgresql.py) to translate MySQL-specific SQL syntax to PostgreSQLFIELD()→CASE WHEN, column alias handling, computed field namingDevelopment Environment Improvements
docker-compose-dev-mysql.yml: MySQL stack (ports 3001/8083/4001/4181)docker-compose-dev-postgresql.yml: PostgreSQL stack (ports 3002/8084/4002/4182)Dashboard Organization
mysql/andpostgresql/directoriesConfiguration Updates
foldersFromFilesStructurein dashboard provisioning to prevent redundant folder creationDoes this close any open issues?
Closes #[issue-number-if-applicable]
Screenshots
N/A - Backend database compatibility changes
Other Information
The conversion script handles the following MySQL → PostgreSQL transformations:
FIELD()function →CASE WHENstatementsDATE_ADD/DATE_SUB→ interval arithmeticCONCAT) →||operator_computedsuffix issues)Both MySQL and PostgreSQL dashboard sets are now maintained in parallel