Devel dpq() not working?
If you want show sql query you can use code below:

function example_views_pre_execute(&amp;$view) {
  if ($view-&gt;name == 'search_jobs'){
        dpq($view-&gt;build_info['query']); 
    }
}


In your code function dpq error because variable $view->build_info['query'] is NULL. The function dpq only run when variable is An object that implements the SelectQueryInterface interface.