First pass of generating sqls.
Still need to figure out how to exclude val tables