#StackBounty: #data-visualization #sql Visualizing SQL query from .sql file

Bounty: 100

I have a folder of independent .sql-files that are used by a FastAPI application to request data from the Oracle Database.

Each file includes a variable (e.g. :plot_fsk) that is later on modified using a function that changes variable in SQL query by means of the sqlalchemy.sql.text as shown here.

Here is the content of a single .sql-file

FROM DB_UTM.A_AA88888 A_AA88888
WHERE A_AA88888.FSK = :plot_fsk

For my documentation I would like to have the graphic representation of those .sql-files in a neat and user-friendly schematic manner. Is there any automatic approach to implement this task?

In that visualization I would like to include:

  • all the tables names
  • all the attributes that are requested in SELECT and WHERE with their original names
  • all the relations between tables, like different JOINs etc.
  • ORDER BY can be neglected

So, the above SQL query will look like:

fancy _diagram

I have seen some articles but none of them mention a visualization from an individual file (when the entire Database should not considered):

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.