Changed run_sql_query() such that it returns the jobid, rather than a request object.