Moved the parsing of mapping sql, and addition of view definitions out
of the conditional branch only treated when not full metadata is needed.