Function for loading sql files from disk and mapping parameters