In IntelliJ IDEs, it is possible to statically analyze SQL queries of multiple dialects (PostgreSQL, MSSQL, SnowSQL). While this is useful during development, having these steps in the CI/CD pipeline ensures that the issues are resolved in the pushed code and that queries written by developers not using the IntelliJ based IDE's are also validated.
I have tagged the question with
python but the question is more generic than this. The specific case that I'm dealing with however contains python code containing inline
An example CI job would look like:
- Generate DDL based on database(s)
- Extract SQL statements from code (using regex or python specific naming conventions)
- Validate the table names, column names, sql query etc
I have search for 'SQL Validation', 'SQL Query Validation', 'SQL Static Analysis', 'DDL query validation' but cannot find a tool which would use DDL to validate SQL queries the same way as the IntelliJ does. What tools can do static analysis of SQL code using DDL like IntelliJ IDEs?