redid logic for genreating SQL statements to make it less hardcoded. I have basically built an array that generates all of the metadata for table, graph, sql stement, log file, ect. This should be heavly reused in other components