Some SQL databases offer you the possibility to see some or all of their structure and extract that. In Hive that is
SHOW CREATE TABLE mytable;
For ORACLE there is the suggestion to use the dbms_metadata to get the information
You might try to combine the approach with KNIME workflows and extract the SQL statemens.
